mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
glgsg: fix sRGB for FBOs created from non-sRGB host window
In this case _current_properties in begin_frame() will not have srgb_color set, as the current props are set by the host window
This commit is contained in:
parent
b0c9000000
commit
e1af4abf11
@ -283,6 +283,13 @@ begin_frame(FrameMode mode, Thread *current_thread) {
|
||||
rebuild_bitplanes();
|
||||
}
|
||||
|
||||
// The host window may not have had sRGB enabled, so we need to do this.
|
||||
#ifndef OPENGLES
|
||||
if (get_fb_properties().get_srgb_color()) {
|
||||
glEnable(GL_FRAMEBUFFER_SRGB);
|
||||
}
|
||||
#endif
|
||||
|
||||
_gsg->set_current_properties(&get_fb_properties());
|
||||
report_my_gl_errors();
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user