Sign in to follow this  
cubicwang

OpenGL how to create cube render target?

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this