Results 1 to 2 of 2

Thread: FrameBufferObject Texture into gl.glTexImage2D ?

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2011
    Posts
    17

    FrameBufferObject Texture into gl.glTexImage2D ?

    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)
    ...
    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?

  2. #2
    Member Contributor
    Join Date
    Oct 2001
    Location
    Germany
    Posts
    60

    Re: FrameBufferObject Texture into gl.glTexImage2D ?

    IMO By creating the Color Atachement I think you must use sth. like that:

    glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENTx_EXT, TEXTURE_CUBE_MAP_POSITIVE_X, fbo_texture.get(0), 0);

Similar Threads

  1. Framebuffer texture: glTexImage2D() vs. glTexStorage2D()
    By john_connor in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 06-10-2016, 08:33 AM
  2. texture level bug (?) with glTexImage2D
    By Ident in forum OpenGL: Drivers
    Replies: 4
    Last Post: 01-13-2012, 10:39 AM
  3. createing framebufferobject (fbo)
    By lobbel in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 04-08-2009, 01:54 PM
  4. Framebufferobject, DepthTest and Floating Point
    By olmeca in forum OpenGL: Advanced Coding
    Replies: 15
    Last Post: 12-16-2005, 09:25 AM
  5. glTexImage2d 2 pxl texture problem
    By in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 05-12-2004, 03:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean