Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Fill a GL_TEXTURE_2D_ARRAY with textures already loaded

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2013
    Posts
    9

    Fill a GL_TEXTURE_2D_ARRAY with textures already loaded

    Hi!

    As the title states, I have a set of textures (specifically render targets textures) that I need to combine somehow. This are already loaded on GPU, is there a way to fill a GL_TEXTURE_2D_ARRAY with such textures or I have to retrieve the images from them first?

    Thanks

  2. #2
    Intern Contributor
    Join Date
    May 2013
    Posts
    60
    If you render the images, the most efficient way would be to render directly into the 2d array. You just need a very simple geometry shader that sets gl_Layer​ via uniform value.
    Or you can use ARB_copy_image, but this feature is kind of new and not available everywhere.

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2013
    Posts
    9
    Quote Originally Posted by Osbios View Post
    If you render the images, the most efficient way would be to render directly into the 2d array. You just need a very simple geometry shader that sets gl_Layer​ via uniform value.
    Or you can use ARB_copy_image, but this feature is kind of new and not available everywhere.
    The problem is that my system infrastructure doesn't allow me to do the render directly onto the layer easily. Also, I was curious if that was possible in general, but I'm afraid is not, right?

  4. #4
    Intern Contributor
    Join Date
    May 2013
    Posts
    60
    OpenGL 3.2 brings everything you need to use layered rendering. The geometry shader is core in 3.2. The rest you need is core in 3.0.
    You also could bind the layers separately onto the FBO. But changing the FBO bindings is expensive on the CPU side.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •