after adding some gl stuff my images are darker. I do stuff alike glEnable this and that in another function. How to revert them or
make my images brighter? What could make my images darker?
Jump to content
Posted 17 May 2014 - 04:56 AM
Way too little information. "I enable some stuff" doesn't suffice to make any reasonably qualified statement.
What you can check, as a shot in the dark, and as one possible reason why your renderings may look "too dark" is whether you're using gamma correctly. The wording "too dark" does not quite describe the effect of gamma correctly, but it's what one might call it at first glance.
To get correct lighting, you need to transform srgb to linear when reading textures (since cameras and most paint programs assume srgb) and transform linear to srgb writing to the framebuffer. Both can be done in hardware via glEnable or manually in a shader. Note that doing the gamma dance incorrectly, you can also get a "too bright" image.
Of course many other things are possible, nobody will be able to tell without information. You might for example have enabled blending, and objects appear darker in front of a black background. Or, something different.
Posted 18 May 2014 - 05:53 AM
This seems to help, but I still need to figure as images are not fading in.:
/// Handle day/night
glColor4f(Red, Green, Blue, AlphaR);
/// Tell Xplane what we are doing
XPLMSetGraphicsState(0/*Fog*/, 1/*TexUnits*/, 0/*Lighting*/, 0/*AlphaTesting*/, 1/*AlphaBlending*/, 1/*DepthTesting*/, 1/*DepthWriting*/);
If I put glcolor4f after setgraphics the images are to dark but fading in ok.
Edited by FGFS, 18 May 2014 - 06:22 AM.
Posted 28 May 2014 - 10:23 AM