PDA

View Full Version : Inverted colors on startup



Toni
01-08-2006, 02:05 AM
Hi, i've noticed a strange behaviour that i don't know if it's normal or something.
After starting my app i show a splash screen that should be displayed black with a grey logo, but i see it completely color inverted, and then 1 or 2 seconds after starting up, the color of the logo turns ok.
Any idea of what's wrong? does the gl context need "some seconds" to initialize? that sounds weird :D

rgpc
01-08-2006, 04:47 PM
Are you using blending? If so what is your blending setup?

Toni
01-09-2006, 02:17 AM
yeah i use blending, the same during all the loading stage:
GL_SRC_ALPHA, GL_ONE_MINS_SRC_ALPHA

but that doesn't had to make any difference, i mean, during loading ... more or less after loading the materials (and not always) u get the correct colors.
Well, probably is some kind of idiot mistake on my code :)

jide
01-09-2006, 07:11 AM
try to enable blending only where you need it.

rgpc
01-09-2006, 11:53 AM
What is the setup of your framebuffer for the splash screen? Presumably you setup a window, render the quad that holds the texture and then leave it alone while you continue the loading of resources etc?

ie. You are not rendering the splash screen continuously (as you would your GUI/Scene etc.) - is it a draw once and forget operation?

If it is then there's something odd going on because once drawn it should stay the same. If you are refreshing it (for whatever reason - eg. you might be diplaying a progress bar or something) then try putting out debug messages that show you at what point in your code the colours change. Then, if you can narrow it down to a function, put debug messages throughout the function to see what causes it (or step through the code). I guess the same could work if you are not redrawing the splash screen as it could be something within your code that is triggering the change.