Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/gpu/GPU_extensions.h')
-rw-r--r--source/blender/gpu/GPU_extensions.h30
1 files changed, 16 insertions, 14 deletions
diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h
index 90b0ac2aee9..a7f43d3b0ae 100644
--- a/source/blender/gpu/GPU_extensions.h
+++ b/source/blender/gpu/GPU_extensions.h
@@ -57,9 +57,11 @@ 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_glsl_support(void);
int GPU_non_power_of_two_support(void);
-int GPU_print_error(char *str);
+int GPU_color_depth(void);
/* GPU Types */
@@ -73,17 +75,17 @@ typedef enum GPUDeviceType {
} GPUDeviceType;
typedef enum GPUOSType {
- GPU_OS_WIN = (1<<16),
- GPU_OS_MAC = (1<<17),
- GPU_OS_UNIX = (1<<18),
+ GPU_OS_WIN = (1<<8),
+ GPU_OS_MAC = (1<<9),
+ GPU_OS_UNIX = (1<<10),
GPU_OS_ANY = (0xff00)
} GPUOSType;
typedef enum GPUDriverType {
- GPU_DRIVER_OFFICIAL = (1<<24),
- GPU_DRIVER_OPENSOURCE = (1<<25),
- GPU_DRIVER_SOFTWARE = (1<<26),
- GPU_DRIVER_UNKNOWN = (0xff0000)
+ GPU_DRIVER_OFFICIAL = (1<<16),
+ GPU_DRIVER_OPENSOURCE = (1<<17),
+ GPU_DRIVER_SOFTWARE = (1<<18),
+ GPU_DRIVER_ANY = (0xff0000)
} GPUDriverType;
int GPU_type_matches(GPUDeviceType device, GPUOSType os, GPUDriverType driver);
@@ -91,14 +93,14 @@ int GPU_type_matches(GPUDeviceType device, GPUOSType os, GPUDriverType driver);
/* GPU Texture
- always returns unsigned char RGBA textures
- if texture with non square dimensions is created, depending on the
- graphics card capabilities the texture may actually be stored in a
+ graphics card capabilities the texture may actually be stored in a
larger texture with power of two dimensions. the actual dimensions
may be queried with GPU_texture_opengl_width/height. GPU_texture_coord_2f
calls glTexCoord2f with the coordinates adjusted for this.
- can use reference counting:
- - reference counter after GPU_texture_create is 1
- - GPU_texture_ref increases by one
- - GPU_texture_free decreases by one, and frees if 0
+ - reference counter after GPU_texture_create is 1
+ - GPU_texture_ref increases by one
+ - GPU_texture_free decreases by one, and frees if 0
- if created with from_blender, will not free the texture
*/
@@ -123,10 +125,10 @@ int GPU_texture_opengl_height(GPUTexture *tex);
/* GPU Framebuffer
- this is a wrapper for an OpenGL framebuffer object (FBO). in practice
- multiple FBO's may be created, to get around limitations on the number
+ multiple FBO's may be created, to get around limitations on the number
of attached textures and the dimension requirements.
- after any of the GPU_framebuffer_* functions, GPU_framebuffer_restore must
- be called before rendering to the window framebuffer again */
+ be called before rendering to the window framebuffer again */
GPUFrameBuffer *GPU_framebuffer_create();
int GPU_framebuffer_texture_attach(GPUFrameBuffer *fb, GPUTexture *tex);