4
\$\begingroup\$

Sorry if the question is stupid but I am very new to opengl.

I render on a target a scene with a couple of object on a background that is nothing more than the clear colour (which is 0.0,0.0,0.0,0.0). When I access the texture again every single pixel has 1 has alpha, how can I make sure the background has 0.0 ?

Thank you

Faye

\$\endgroup\$
  • 1
    \$\begingroup\$ Does your FBO have alpha? How are you accessing it? glReadPixels? \$\endgroup\$ – Khlorghaal Aug 7 '15 at 6:19
  • 1
    \$\begingroup\$ Are you calling glClear(GL_COLOR_BUFFER_BIT); at the beginning of each frame? Did you set your clear color with glClearColor(0.0f, 0.0f, 0.0f, 0.0f); ? \$\endgroup\$ – Foggzie Jan 4 '16 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.