You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I start my glfm based app, the first few short moments there is a bright green flash behind the rendered scene.
See the video below:
video5942563557299194754.mp4
This happens every time I minimize the app, and go back in. Also when I start the app for the first time.
It seems to be the green default Android icon that is mixed in with my rendering.
Now I've double checked that:
i'm on the latest version of glfm
i'm clearing my buffers every time I render (both GL_COLOR_BUFFER_BIT and GL_DEPTH_BUFFER_BIT)
i set the clear color & depth using glClearColor and glClearDepthf
my viewport, blending etc. settings are correct
Is there anything glfm related that could cause this? Is there some sort of blending setting I can change in Android or something? I realize this MIGHT not be glfm related, but as of now I just don't know for certain.
Thanks in advance for any help!
Marc
The text was updated successfully, but these errors were encountered:
Okay, I figured this out now, you gotta love rubber ducking...
I did everything right except for ONE thing: I cleared my color to alpha 0.f!
So I wrote: glClearColor(0.0f, 0.0f, 0.0f, 0.f); glClear(GL_COLOR_BUFFER_BIT);
But I should have written: glClearColor(0.0f, 0.0f, 0.0f, 1.f); glClear(GL_COLOR_BUFFER_BIT);
With the alpha values set to 0, apparently Android felt the need to blend my rendering in with its own activity background or something, for the first 500 milliseconds or so.
Clearing the alpha to 1.0 immediately fixed my problem!
When I start my glfm based app, the first few short moments there is a bright green flash behind the rendered scene.
See the video below:
video5942563557299194754.mp4
This happens every time I minimize the app, and go back in. Also when I start the app for the first time.
It seems to be the green default Android icon that is mixed in with my rendering.
Now I've double checked that:
GL_COLOR_BUFFER_BIT
andGL_DEPTH_BUFFER_BIT
)glClearColor
andglClearDepthf
Is there anything glfm related that could cause this? Is there some sort of blending setting I can change in Android or something? I realize this MIGHT not be glfm related, but as of now I just don't know for certain.
Thanks in advance for any help!
Marc
The text was updated successfully, but these errors were encountered: