Jump to content
  • Advertisement
Sign in to follow this  
DerTherion

FrameBufferObject Texture into gl.glTexImage2D ?

This topic is 3469 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello, i try to work with cubemapping and got an simple problem: i have an FrameBufferObject Texture and want to put it into gl.glTexImage2D to make it useable for the cubmapping effect //this is my fbo gl.glBindTexture(GL.GL_TEXTURE_2D, fbo_texture.get(0)) ... //and here i need the fbo ( i need only the Positive_X with FBO) ... // Cubemapping Textures gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL.GL_RGBA, imageSize, imageSize, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, imageBuf1); gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 0, GL.GL_RGBA, imageSize, imageSize, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, imageBuf4); gl.glTexImage2D(GL.GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 0, GL.GL_RGBA, imageSize, imageSize, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, imageBuf2); ... ... ... how can i do this?

Share this post


Link to post
Share on other sites
Advertisement
Ideally you want to create the cubemap, then attach a face of the cube-map to the FBO using glFramebufferTexture2D, and render directly into the cube-map face(s).

Share this post


Link to post
Share on other sites
Yea the whole point of FBO's is that your rendering to the texture, not copying it with glTexImage2D.

Find a tutorial on FBO's, its simple.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!