diff options
Diffstat (limited to 'source/blender/gpu/GPU_extensions.h')
-rw-r--r-- | source/blender/gpu/GPU_extensions.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h index a7f43d3b0ae..90c99257087 100644 --- a/source/blender/gpu/GPU_extensions.h +++ b/source/blender/gpu/GPU_extensions.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -30,6 +30,10 @@ * ***** END GPL LICENSE BLOCK ***** */ +/** \file GPU_extensions.h + * \ingroup gpu + */ + #ifndef GPU_EXTENSIONS_H #define GPU_EXTENSIONS_H @@ -57,7 +61,7 @@ typedef struct GPUShader GPUShader; void GPU_extensions_disable(void); void GPU_extensions_init(void); /* call this before running any of the functions below */ void GPU_extensions_exit(void); -int GPU_print_error(char *str); +int GPU_print_error(const char *str); int GPU_glsl_support(void); int GPU_non_power_of_two_support(void); @@ -130,19 +134,20 @@ int GPU_texture_opengl_height(GPUTexture *tex); - after any of the GPU_framebuffer_* functions, GPU_framebuffer_restore must be called before rendering to the window framebuffer again */ -GPUFrameBuffer *GPU_framebuffer_create(); +GPUFrameBuffer *GPU_framebuffer_create(void); int GPU_framebuffer_texture_attach(GPUFrameBuffer *fb, GPUTexture *tex); void GPU_framebuffer_texture_detach(GPUFrameBuffer *fb, GPUTexture *tex); void GPU_framebuffer_texture_bind(GPUFrameBuffer *fb, GPUTexture *tex); void GPU_framebuffer_texture_unbind(GPUFrameBuffer *fb, GPUTexture *tex); void GPU_framebuffer_free(GPUFrameBuffer *fb); -void GPU_framebuffer_restore(); +void GPU_framebuffer_restore(void); /* GPU OffScreen - - wrapper around framebuffer and texture for simple offscreen drawing */ + - wrapper around framebuffer and texture for simple offscreen drawing + - changes size if graphics card can't support it */ -GPUOffScreen *GPU_offscreen_create(int width, int height); +GPUOffScreen *GPU_offscreen_create(int *width, int *height); void GPU_offscreen_free(GPUOffScreen *ofs); void GPU_offscreen_bind(GPUOffScreen *ofs); void GPU_offscreen_unbind(GPUOffScreen *ofs); @@ -156,9 +161,9 @@ GPUShader *GPU_shader_create(const char *vertexcode, const char *fragcode, const void GPU_shader_free(GPUShader *shader); void GPU_shader_bind(GPUShader *shader); -void GPU_shader_unbind(); +void GPU_shader_unbind(GPUShader *shader); -int GPU_shader_get_uniform(GPUShader *shader, char *name); +int GPU_shader_get_uniform(GPUShader *shader, const char *name); void GPU_shader_uniform_vector(GPUShader *shader, int location, int length, int arraysize, float *value); void GPU_shader_uniform_texture(GPUShader *shader, int location, GPUTexture *tex); |