java - glTranslate error in simple JOGL program -
I'm trying to create a simple JOGL program, and I've gone into a problem. I have so far imported all the necessary package into my class file, however now, whenever I use the glTranslate function, it is being flagged as red as an error, for example this code At the end of the block
Public Zero lab2a (GLAutoDrawable drawable) {GL gl = drawable.getGL (); Gl.glTranslatef (-1.0F, -1.0F, -6F); // First rectangular (blue) gl.glBegin (GL.GL_QUADS) drawing; Gl.glColor3f (0f, 0f, 1f); // set color blue gl.glVertex3f (-0.5f, 0.5 f, 0.0f); // top left top gl.glVertex3f (0.5 F, 0.5 F, 0.0F); // Top right angle gl.glVertex3f (-0.5 F, -0.5F, 0.0F); // lower left gl.glVertex3f (0.5 F, -0.5F, 0.0F); // bottom right gl.glEnd (); Gl.glTranslate (1.1f, 0f, 0f); The flag reads: "The symbol can not be found", and I am present for every use of the use of glTranslate. Does anyone know how to fix this?
Please visit JOGL 2, but go on. Replacing GL.GL_QUADS with GL2.GL_QUADS, replace with GL gl = drawable.getGL () GL2GL = drawable (getGL). GetGL2 (), etc ... View the API documentation.
Comments
Post a Comment