Jump to content
  • Advertisement
Sign in to follow this  
cubicwang

OpenGL how to create cube render target?

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

I want to use cube render target to generate a shadow map for point light. But I can't find a clear info for how to create a cube render target in opengl and how could I set each of the face as the render target? Please Help!! Thank you very much!!!!

Share this post


Link to post
Share on other sites
Advertisement
Create the cube_map just like you would normally. However, when you want to reference an indivual face as a 2d texture, bind the cubemap then specify the face as the texture target via GL_CUBE_MAP_NEG_X etc (or whatever they are, i cant remember off the top of my head)

Share this post


Link to post
Share on other sites
Quote:
Original post by Exorcist
Create the cube_map just like you would normally. However, when you want to reference an indivual face as a 2d texture, bind the cubemap then specify the face as the texture target via GL_CUBE_MAP_NEG_X etc (or whatever they are, i cant remember off the top of my head)


that's interesting, but what about FBO's ? do you know how to specify the cubemap's face to render to ?

I'm quite confused because a cube has 6 faces and my hardware is supposed to handle 4 color attachements max (geforce 6600)...

So is it or not possible to use one single FBO to render the hole cube map ?

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!