Using Oculus and Render to Texture feature
I'm currently trying to use Oculus Rift and also want to create a mirror like object inside the environment. For that purpose I have created new Camera object and initialized the FrameBuffer with that Camera. Afterwards, I have assigned the imagebuffer component of FrameBuffer to a mesh. However, I'm not able to view any output from camera that is rendered to a Texture.
Here is the part of code that where I'm trying to achieve the desired functionality:
camera = new cCamera(world); camera->setClippingPlanes(0.001, 10.0); frameBuffer = cFrameBuffer::create(); frameBuffer->setup(camera); mirror = new cMesh(); mirror ->setTexture(frameBuffer->m_imageBuffer); mirror ->setUseTexture(true);
Kindly, Help me in this regard. Thanks in advance.