[Bf-committers] Workaround for long-standing Apple openGL bug

Matt Ebb matt at mke3.net
Thu Nov 26 02:11:43 CET 2009


Hi,

I just spent some time investigating an OpenGL driver bug that's been  
around on OS X for a while. I was hoping it would be fixed in 10.6 but  
apparently it's not (reports in tracker [1]).

The bug affects anything using glTexSubImage2D(), notably in blender  
things like node previews or 3D background images that use  
glaDrawPixelsTex(). According to a report I found [2], glTexSubImage2D  
is being improperly affected by glPixelZoom, where it shouldn't be.  
This makes it transfer the wrong amount of pixels.

Here's how the bug looks on my macbook pro, 10.5:

http://mke3.net/blender/devel/2.5/apple_glbug.mov

It makes node previews and background images basically unusable.

to workaround, I just force glPixelZoom(1.0, 1.0) before the  
glTexSubImage2D calls and restore it after. This seems to work fine:

http://mke3.net/blender/devel/2.5/apple_glbug_workaround.mov

So, any openGL gurus: is this ok to apply? According to that link, the  
bug has been logged with apple, but it's been over a year already, and  
nothing's been done, so I'd really like to have some workaround to at  
least make this aspect of Blender usable on os x.

cheers,

Matt



[1] http://projects.blender.org/tracker/index.php?func=detail&aid=20034&group_id=9&atid=498
[2] http://lists.apple.com/archives/Mac-opengl/2008/Jul/msg00117.html

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: apple_texsubimage2d_workaround.txt
Url: http://lists.blender.org/pipermail/bf-committers/attachments/20091126/c117c32c/attachment.txt 
-------------- next part --------------



More information about the Bf-committers mailing list