Package javax.media.opengl

Examples of javax.media.opengl.GL2.glVertex2f()


            // otherwise draw a polygon
            else
                gl.glBegin(GL2.GL_TRIANGLE_FAN); /* For best performance here */

            for (final Point vertex : hole)
                gl.glVertex2f(vertex.x, vertex.y);

            gl.glEnd();
        }

                /* Finally draw all of the circular holes */
 
View Full Code Here


        // otherwise draw a polygon
        else
            gl.glBegin(GL2.GL_POLYGON);

        for (final Point vertex : polygon.vertices())
            gl.glVertex2f(vertex.x, vertex.y);

        gl.glEnd();

        // pop current color
        gl.glPopAttrib();
View Full Code Here

            // the inside is red
            gl.glColor3f(1.0f, 0.0f, 0.0f);
          else
            // the outside is gray
            gl.glColor3f(0.0f, 0.0f, 0.0f);
          gl.glVertex2f(x, y);
        }
      }
      gl.glEnd();
      // pop the current color
      gl.glPopAttrib();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.