I made the attached patch to fix bug #21894.
https://projects.blender.org/tracker/index.php?func=detail&aid=21894
What I discovered was that the glGetIntegerv calls within wm_get_colordepth() in source/blender/windowmanager/intern/wm_subwindow.c was not retrieving a result.
The best way I found to get around this is within GPU_extensions_init() located in source/blender/gpu/intern/gpu_extensions.c - instead of getting the bit depth and storing a boolean value of whether the screen is 24bit I cached the screen depth. I have calculated the depth using GL_RED_BITS * 3 which should be sufficient but it could be altered to get each colour depth.
I modified the GPUGlobals structure to reflect storing the screendepth instead of the color24bit boolean.
I also modified the GPU_24bit_color_support() function to test whether the cached screen depth is 24 bit.
I then added another function to return the cached screen depth and added the prototype to the header file.
I then changed wm_get_colordepth() in source/blender/windowmanager/intern/wm_subwindow.c to use this change instead of calling glGetIntegerv itself.
I have declared the above screen depth function as an extern in this file to test but the search paths should probably be updated so the header file is included instead.
The changes to wm_get_colordepth() probably make it redundant as retrieving the GL_AUX_BUFFERS most likely doesn't work either. Leading to the possibility of removing wm_get_colordepth() and replacing calls to it with GPU_screen_depth()
Description
Description
Event Timeline
Comment Actions
This can be closed as the patch has been applied to svn.
see - https://projects.blender.org/tracker/index.php?func=detail&aid=21894