Login  Register

Re: Empty Begin/End drawing things!!!

Posted by NickJPGeorge on Oct 09, 2010; 1:51am
URL: https://forum.jogamp.org/Empty-Begin-End-drawing-things-tp1667610p1668648.html

Hmm, does it matter that I'm using GL2 instead of GL3?  (I'm still kind of fuzzy about the difference)?

I used

drawable.setGL(new DebugGL2(drawable.getGL().getGL2())); instead.  

It doesn't give me any errors.

I've learned a little more about the problem:  The thing being drawn is a real thing, that should be drawn.   It's just being drawn at the wrong time.  So, for instance

gl.glPushMatrix();
//transforms  #1
//Draw Box
gl.glPopMatrix();

gl.glPushMatrix();
//transforms #2
gl.glBegin(GL2.GL_QUADS);
gl.glEnd();
gl.glPopMatrix();

The box is being drawn under transforms #2 instead of transforms #1, even though the begin/end block after transforms #2 is empty.