• Advertisement
Sign in to follow this  

What can glFramebufferTexture1D/2D/3D do that glFramebufferTextureLayer can't?

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

It seems that glFramebufferTexture and glFramebufferTextureLayer have all of the parameters needed to specify the exact image needed in any kind of texture, including cube map arrays (using the layer-face index). Am I missing something?

Edited by CDProp

Share this post


Link to post
Share on other sites
Advertisement

glFramebufferTextureLayer should be used with 1D/2D array textures to attach only one layer to framebuffer. I'm not sure, but I think the regular glFramebufferTexture1D/2D will fail if you'll use it with 1D/2D texture array.

Share this post


Link to post
Share on other sites

Yeah. So it seems like glFramebufferTexture and glFramebufferTextureLayer can do everything that the 1D/2D/3D versions can do, and more.

 

If I want to attach a single-layered texture, or use layered rendering, I can use glFramebufferTexture.

If I want to attach to a single layer of a cube map, (1D/2D/Cube) array texture, or 3D texture, I can use glFramebufferTextureLayer.

 

So when do I ever need the 1D/2D/3D functions?

Share this post


Link to post
Share on other sites

Hmmmmm, I'm still a little unclear as to how to properly point to a cube map image using the glFramebufferTexture and glFramebufferTextureLayer functions. This may be an area where we still need the 2D version. It seems that, with glFramebufferTexture2D, one would use the textarget parameter to specify which face to use.

 

Perhaps glFramebufferTexture3D can be used to specify a layer in a cube map array texture? I sort of doubt it, though, because the documentation says that GL_TEXTURE_3D is the only valid textarget for glFramebufferTexture3D.

 

I know that glFramebufferTexture can be used along with a cube map to set up layered rendering, but I am not sure how to use glFramebufferTextureLayer to point to a specific layer-face of a cube map (or indeed if this is even possible). 

 

This seems to be one of the more confusing sets of APIs within the OpenGL universe. =P =)

Edited by CDProp

Share this post


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

  • Advertisement