generate cubemaps in Ogre

What it says on the tin: a place to discuss proposed new features.
Post Reply
User avatar
FrameFever
Platinum Sponsor
Platinum Sponsor
Posts: 414
Joined: Fri Apr 27, 2007 10:05 am

generate cubemaps in Ogre

Post by FrameFever »

Does anybody have a code snippet to generate Cubemaps in Ogre?
I'm interested in it.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

Just create a cube texture with the TU_RENDERTARGET option, then get each of the 6 buffers (tex->getBuffer(n)) and from there the RenderTarget (getRenderTarget()), and create viewports on them like any other surface. Render to them using 6 different cameras each facing in a different direction. You can even do it in realtime for reflections if you want.
Post Reply