mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
check for 24 bpp correctly
This commit is contained in:
parent
bbbe8cbf9f
commit
b4d3ccd1a7
@ -403,15 +403,18 @@ reset() {
|
||||
}
|
||||
|
||||
// use per-vertex fog if per-pixel fog requires SW renderer
|
||||
GLP(Hint)(GL_FOG_HINT,GL_DONT_CARE);
|
||||
GLP(Hint)(GL_FOG_HINT, GL_DONT_CARE);
|
||||
|
||||
GLint iRedBits;
|
||||
GLP(GetIntegerv)(GL_RED_BITS,&iRedBits);
|
||||
if(iRedBits<24) {
|
||||
GLint num_red_bits;
|
||||
GLP(GetIntegerv)(GL_RED_BITS, &num_red_bits);
|
||||
if (num_red_bits < 8) {
|
||||
GLP(Enable)(GL_DITHER);
|
||||
_dithering_enabled = true;
|
||||
if(GLCAT.is_debug())
|
||||
GLCAT.debug() << "frame buffer depth < 8bits channel, enabling dithering\n";
|
||||
if (GLCAT.is_debug()) {
|
||||
GLCAT.debug()
|
||||
<< "frame buffer depth = " << num_red_bits
|
||||
<< " bits/channel, enabling dithering\n";
|
||||
}
|
||||
}
|
||||
|
||||
// Output the vendor and version strings.
|
||||
|
Loading…
x
Reference in New Issue
Block a user