Re: Using JOGL to Draw on 2D Coordinates
Posted by
gouessej on
Oct 04, 2013; 5:21pm
URL: https://forum.jogamp.org/Using-JOGL-to-Draw-on-2D-Coordinates-tp4030146p4030152.html
Hi
Actually, you don't need to modify your projection matrix at each display, you should rather use the init() method to initialize OpenGL. The projection matrix defines the projection, both the kind of projection (orthogonal, perspective) and the frustum. The model-view matrix defines where and how you look at. In your case, the default values of the model-view matrix are ok. OpenGL isn't the kind of thing you can learn within days, keep it in mind. I advise you to look at Nehe tutorials too even though they are a bit outdated. You use immediate mode which is very slow. It's enough for pedagogical purposes but I advise you to learn about vertex arrays and VBOs. Moreover, you use the fixed pipeline, I hope you plan to learn how to use shaders when you feel comfortable with the basic concepts.