Hi,
I would like to draw a full screen quad with the corners (-1,-1) and (1,1). How do I do that?
Best,
Andreas
Try this: http://www.jmonkeyengine.com/wiki/doku.php?id=our_first_hud_example
In brief, use a Quad in ortho render queue and use:
hudQuad.setLocalTranslation(new Vector3f(display.getWidth()/2,display.getHeight()/2,0));
N.
Hi,
thx for your answer!
I tried:
Quad oQuad=new Quad("myQuad",width,height);
rootNode.attachChild(oQuad);
oQuad.setRenderQueueMode(Renderer.QUEUE_ORTHO);
oQuad.setLocalTranslation(new Vector3f(width/2,height/2,0));
With that, I get a full screen quad. But, I want to have a quad with the corners (-1;-1) and (1,1).
So, I tried:
Quad oQuad=new Quad("myQuad",2,2);
rootNode.attachChild(oQuad);
this.cam.setParallelProjection(true);
this.cam.setFrustumPerspective(45f, 1, 2, 1000);
this.cam.update();
which I found with luck and what works. Isn't there something like gluOrtho2D()?
Best,
Andreas