Skip to main content
GameDev.net gamedev.net
🔒 Locked

Texture from backbuffer

Started by mooserman352 Mar 17, 2005 at 7:31 PM 0 replies 650+ views
Original Post
mooserman352
mooserman352
I'm having an issue copying a texture from the backbuffer. I'm using glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB,....) to copy the buffer onto a texture, and then draw the texture to a quad. This all works fine, the issue is with transparency. I'm using GL_MODULATE, so the alpha value should be the alpha of the quad * alpha of the texture. This works fine for normal textures, but doesn't work for the texture copied from the back buffer, which just results in an alpha of 1. Why is this, and how can I fix this?
nts
nts
Quote:
Original post by mooserman352
I'm having an issue copying a texture from the backbuffer. I'm using glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB,....) to copy the buffer onto a texture, and then draw the texture to a quad. This all works fine, the issue is with transparency. I'm using GL_MODULATE, so the alpha value should be the alpha of the quad * alpha of the texture. This works fine for normal textures, but doesn't work for the texture copied from the back buffer, which just results in an alpha of 1. Why is this, and how can I fix this?


Does your framebuffer have an alpha channel?

When copying the texture you posted GL_RGB, you should change that to GL_RGBA to copy the alpha channel as well.

HTH

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.