Hi, I am writing simple demo for oculus and using IrrOculusVR project. I have custom node to draw a XYZ plot with some pixels in this space using driver-> draw3DLine, drawVertexPrimitiveList in render() method. Parent of this node is second scene manager which also handles events (rotation of axis, zoom in/out). Before connecting to oculus I used setViewPort to get realtime view of second scene in right bottom corner of screen. Now I created billboard and attached it to main scene manager. I am drawing second scene on render texture which is set as material for billboard.
Billboard is rotating with camera and has position in space, I don't want this. Also I don't want to mess up with setting viewport for eyes and doing it old way.
I want to do this as a part of main scene - some kind of node - but fix it to always show like 2D image in corner of screen. Is there a way to do that or some better solution?
Static billboard
Re: Static billboard
Just draw it. This is my code to draw the RT in the top left corner.
Code: Select all
irr::core::recti srcrect = irr::core::recti(irr::core::vector2di(0, 0), rt->getSize());
irr::core::recti destrect = irr::core::recti(irr::core::vector2di(0, 0), irr::core::vector2di(
(int) (rt->getSize().Width/16.0), (int) (rt->getSize().Height/16.0)));
driver->draw2DImage(rt, destrect, srcrect);
Re: Static billboard
Yes, I can do that. For both eyes I call draw2DImage but in result I got three RGB lines instead of white .
I am not quite sure about using videoDriver with oculus. What is in sceneManager is displayed ok (not mentioning lack of antialiasing which I turned on ;/), but as I said for draw2DImage white line is seen as rgb lines.
I am not quite sure about using videoDriver with oculus. What is in sceneManager is displayed ok (not mentioning lack of antialiasing which I turned on ;/), but as I said for draw2DImage white line is seen as rgb lines.
Re: Static billboard
Attach the billboard to the camera.