Jump to content

  • Log In with Google      Sign In   
  • Create Account


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


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 CDProp   Members   -  Reputation: 943

Like
0Likes
Like

Posted 12 January 2013 - 03:51 PM

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, 12 January 2013 - 04:03 PM.


Sponsor:

#2 Martins Mozeiko   Crossbones+   -  Reputation: 1422

Like
0Likes
Like

Posted 12 January 2013 - 04:08 PM

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.



#3 CDProp   Members   -  Reputation: 943

Like
0Likes
Like

Posted 12 January 2013 - 04:14 PM

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?



#4 Martins Mozeiko   Crossbones+   -  Reputation: 1422

Like
0Likes
Like

Posted 12 January 2013 - 04:17 PM

If you're using OpenGL version < 3.2.



#5 CDProp   Members   -  Reputation: 943

Like
0Likes
Like

Posted 12 January 2013 - 04:23 PM

Bingo, got it. Thanks!



#6 CDProp   Members   -  Reputation: 943

Like
0Likes
Like

Posted 13 January 2013 - 06:02 PM

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, 13 January 2013 - 06:03 PM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS