Sign in to follow this  

FrameBufferObject Texture into gl.glTexImage2D ?

This topic is 3283 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
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

This topic is 3283 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this