getting a wrong pixel buffer format

Problems building or running the engine, queries about how to use features etc.
Post Reply
andreahmed
Kobold
Posts: 38
Joined: Wed Dec 31, 2014 2:26 am
x 2

getting a wrong pixel buffer format

Post by andreahmed »

Hi,
I modified ogresource code to work with hololens. So I have grabbed the camrea buffer from the camera, and I want to bind it to the rendertarget of hololens.
When I try to get a hardware pixel format from a texture, I get a different format than the original render target texture is.

Ogre::TexturePtr * ogreTexture = mOgreContentRenderer->getTextures();
ogreTexture[LeftEye].get()->SetTexture(cameraBackBuffer.Get());
Ogre::HardwarePixelBufferSharedPtr buffer = ogreTexture[LeftEye]->getBuffer();
ogreTexture[LeftEye]->getBuffer()->getRenderTarget(0)->rebind((Ogre::D3D11HardwarePixelBuffer*)buffer.get());
Post Reply