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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-02-01 02:45:51 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-02-01 02:45:51 +0300
commit87bbb2d827064a4fd59ffc77cc2dcbc31f02ce4f (patch)
tree5d9ddb0e6859850825de07d18475797957d1a969 /source/blender/gpu/GPU_extensions.h
parent873f2c71252da872f3fd1d9aa2140e3067ba6890 (diff)
WM Draw Methods now has a new option Automatic (default). This will
set the draw method to triple buffer or overlap depending on the configuration. Ideally I could get all cases working well with triple buffer but it's hard in practice. At the moment there are two cases that use overlap instead: * opensource ATI drives on linux * windows software renderer Also added a utility function to check GPU device/os/driver.
Diffstat (limited to 'source/blender/gpu/GPU_extensions.h')
-rw-r--r--source/blender/gpu/GPU_extensions.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h
index c2af4e8fcb1..998c13d2a64 100644
--- a/source/blender/gpu/GPU_extensions.h
+++ b/source/blender/gpu/GPU_extensions.h
@@ -37,8 +37,6 @@
extern "C" {
#endif
-/* GPU extensions support */
-
struct Image;
struct ImageUser;
@@ -54,6 +52,8 @@ typedef struct GPUOffScreen GPUOffScreen;
struct GPUShader;
typedef struct GPUShader GPUShader;
+/* GPU extensions support */
+
void GPU_extensions_disable(void);
void GPU_extensions_init(void); /* call this before running any of the functions below */
void GPU_extensions_exit(void);
@@ -61,6 +61,33 @@ int GPU_glsl_support(void);
int GPU_non_power_of_two_support(void);
int GPU_print_error(char *str);
+/* GPU Types */
+
+typedef enum GPUDeviceType {
+ GPU_DEVICE_NVIDIA = (1<<0),
+ GPU_DEVICE_ATI = (1<<1),
+ GPU_DEVICE_INTEL = (1<<2),
+ GPU_DEVICE_SOFTWARE = (1<<3),
+ GPU_DEVICE_UNKNOWN = (1<<4),
+ GPU_DEVICE_ANY = (0xff)
+} GPUDeviceType;
+
+typedef enum GPUOSType {
+ GPU_OS_WIN = (1<<16),
+ GPU_OS_MAC = (1<<17),
+ GPU_OS_UNIX = (1<<18),
+ 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)
+} GPUDriverType;
+
+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