Andrew
unread,Mar 18, 2012, 1:21:51 PM3/18/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to phi...@googlegroups.com
Hi, I'm new to OpenGL, to webGL and to philoGL ... !
I'm trying to make a scene based on the example lesson #9, and so far it's going well, I can see my objects whirling through space.
I'm using whatever the default shaders are (because I don't want to do blending, just normal texture mapping), and set depth testing.
Now I want to set an orthographic projection. My objects lie roughly in the box [-1,1] x [-1,1] x [-1,1], so I thought I could just do this:
camera.view.ortho(-1, 1, -1, 1, -1, 1);
instead of calling camera update... but I see nothing.
I tried setting an identity matrix with
camera.view.set([1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1]);
but again, I see nothing. I was hoping later to set the z multiplier to 0 to get an orthographic transform.
I can manipulate the view with this:
camera.view.perspective(90, 1, 5, -2);
which seems to work (though the values for "near" and "far" puzzle me), but obviously this is perspective, not orthographic
can anyone give me a pointer? thanks