View Single Post
Old 05-29-11, 04:43 PM   #1
snzzbk
Registered User
 
Join Date: Nov 2008
Posts: 10
Default BindFramebuffer screws up framebuffer_sRGB state

Using 270.41.19 on a GTX 260, binding or unbinding a framebuffer object when FRAMEBUFFER_SRGB is enabled sometimes (depending somehow on the state and buffer properties) causes subsequent operations to be performed as if FRAMEBUFFER_SRGB were disabled, even though glIsEnabled reports that it is still enabled. Disabling and then re-enabling FRAMEBUFFER_SRGB after such a binding resolves the issue.

I've attached a test program and a screenshot to demonstrate the problem. The program fills the window with medium gray (.5,.5,.5); the left half is drawn after changing the framebuffer binding with FRAMEBUFFER_SRGB enabled, and the right half is then drawn after disabling and re-enabling FRAMEBUFFER_SRGB. The left half is filled with (.5,.5,.5) (no conversion), whereas the right half is filled with the sRGB-converted value.

Compilation instructions and other notes are in the program's comments.
Attached Thumbnails
Click image for larger version

Name:	srgbtest-output.png
Views:	93
Size:	995 Bytes
ID:	42844  
Attached Files
File Type: bz2 nvidia-bug-report.log.bz2 (61.7 KB, 74 views)
File Type: txt srgbtest.cpp.txt (5.6 KB, 128 views)
snzzbk is offline   Reply With Quote