Login  Register

Re: Distortion Along y axis

Posted by John Johns on Oct 10, 2016; 7:44pm
URL: https://forum.jogamp.org/Distortion-Along-y-axis-tp4037298p4037303.html

When I get comment out like below, it does not draw the player's arm thin anymore, but is otherwise the same. When I additionally comment out matrix.rewind() nothing is viewable.

/*gl.glLoadIdentity();
gl.glBegin(gl.GL_QUADS);
gl.glColor3f(5.0f, 0.0f, 3.0f);
gl.glVertex3f(1.0f, 1.0f, 0.0f);
gl.glVertex3f(2.0f, 1.0f, 0.0f);
gl.glVertex3f(2.0f, 1.0f, -5.0f);
gl.glVertex3f(1.0f, 1.0f, -5.0f);
gl.glEnd();*/
matrix.rewind();
gl.glLoadMatrixf(matrix);

Also, as I am new to JOGL and have only been working on this first person shooter for about a week, I am not sure what you mean by "Don't use the same projection matrix to draw the crosshair and the rest", or how I would go about doing it. However, thank you for  the GLU advise, I went and made that change to the project. Lastly, which NEWT class are you suggesting? I see a NEWTCanvasAWT class, a Window Class, a Display Class, and multiple others. Briefly looked through them but couldn't find one that appeared to match how I was creating the window already.