Put 6 Textures into one Cubic Texutre

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
white_waluigi
Goblin
Posts: 253
Joined: Sat Sep 28, 2013 3:46 pm
x 10

Put 6 Textures into one Cubic Texutre

Post by white_waluigi »

As far as I understood, a cubic Ogre::texture basicly consists of 6 individual textures.
So how can I create a cubic Ogre::texture and put the 6 other Ogre::textures into it?
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 138

Re: Put 6 Textures into one Cubic Texutre

Post by c6burns »

As I mentioned in the original thread: http://www.ogre3d.org/forums/viewtopic.php?f=1&t=81162

Sample_CubeMapping does exactly this.
white_waluigi
Goblin
Posts: 253
Joined: Sat Sep 28, 2013 3:46 pm
x 10

Re: Put 6 Textures into one Cubic Texutre

Post by white_waluigi »

OH, right, forgot about that one.
Thanks and sorry for reposting.
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 138

Re: Put 6 Textures into one Cubic Texutre

Post by c6burns »

No worries, I'm sure you'll see the call to TextureManager::createManual there and get it. In that sample it passes TU_RENDERTARGET as the texture usage so it can dump the RTTs directly into the 6 texture buffers each frame. You could also specify different usage, for instance if you had 6 textures already and weren't doing a dynamic environment map :)
Post Reply