diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-04-05 14:25:40 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-04-05 14:25:40 +0400 |
commit | ec5527cb520366e95cf3fe3c594d9e8f65f1b7ad (patch) | |
tree | f295ba26bbec98ee796599b2e2894c28a4377b88 /source/blender/gpu/intern/gpu_extensions.c | |
parent | 8b7d1775c3977f5afaa40363502f826b37266475 (diff) |
Fix #21349: triple buffer drawing doesn't work well with thousands of
colors setting on Mac, just disabled it in that case.
Diffstat (limited to 'source/blender/gpu/intern/gpu_extensions.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_extensions.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index 8e0a23ccfeb..d53b8e67c56 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -71,6 +71,7 @@ static struct GPUGlobal { GLuint currentfb; int glslsupport; int extdisabled; + int color24bit; GPUDeviceType device; GPUOSType os; GPUDriverType driver; @@ -92,6 +93,7 @@ void GPU_extensions_disable() void GPU_extensions_init() { + GLint bits; const char *vendor, *renderer; glewInit(); @@ -106,6 +108,9 @@ void GPU_extensions_init() if (!GLEW_ARB_vertex_shader) GG.glslsupport = 0; if (!GLEW_ARB_fragment_shader) GG.glslsupport = 0; + glGetIntegerv(GL_RED_BITS, &bits); + GG.color24bit = (bits >= 8); + vendor = (const char*)glGetString(GL_VENDOR); renderer = (const char*)glGetString(GL_RENDERER); @@ -170,6 +175,11 @@ int GPU_non_power_of_two_support() return GLEW_ARB_texture_non_power_of_two; } +int GPU_24bit_color_support() +{ + return GG.color24bit; +} + int GPU_print_error(char *str) { GLenum errCode; |