Package javax.media.opengl

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


        gl.glTexCoord2f(texMinU, texMaxV); gl.glVertex2f(mapMinX,mapMinY);
        gl.glTexCoord2f(texMaxU, texMaxV); gl.glVertex2f(mapMaxX,mapMinY);
        gl.glTexCoord2f(texMaxU, texMinV); gl.glVertex2f(mapMaxX,mapMaxY);
        gl.glTexCoord2f(texMinU, texMinV); gl.glVertex2f(mapMinX,mapMaxY);
        gl.glEnd();

        // Java 3D always clears the Z-buffer
        gl.glDepthMask(true);
        gl.glClear(GL.GL_DEPTH_BUFFER_BIT);
        gl.glPopAttrib();
View Full Code Here


        gl.glBegin(GL2.GL_QUADS);
        gl.glTexCoord2f(texMinU, texMinV); gl.glVertex2f(mapMinX,mapMinY);
        gl.glTexCoord2f(texMaxU, texMinV); gl.glVertex2f(mapMaxX,mapMinY);
        gl.glTexCoord2f(texMaxU, texMaxV); gl.glVertex2f(mapMaxX,mapMaxY);
        gl.glTexCoord2f(texMinU, texMaxV); gl.glVertex2f(mapMinX,mapMaxY);
        gl.glEnd();

        // Restore texture Matrix transform
        gl.glPopMatrix();

        gl.glMatrixMode(GL2.GL_MODELVIEW);
View Full Code Here

                coloroff += stride;
                coordoff += stride;
                texCoordoff += stride;
                vAttrOff += stride;
            }
            gl.glEnd();
        }
    }

    // used to Build Dlist GeometryArray by Reference with java arrays
    @Override
View Full Code Here

                    coloroff += stride;
                    coordoff += stride;
                    texCoordoff += stride;
                    vAttrOff += stride;
                }
                gl.glEnd();
            }
        } else if ((geo_type == GeometryRetained.GEO_TYPE_QUAD_SET) ||
                (geo_type == GeometryRetained.GEO_TYPE_TRI_SET) ||
                (geo_type == GeometryRetained.GEO_TYPE_POINT_SET) ||
                (geo_type == GeometryRetained.GEO_TYPE_LINE_SET)) {
View Full Code Here

  gl.glBegin(GL_LINES);
            gl.glVertex2i(mu1 - 4, mu2);
            gl.glVertex2i(mu1 + 4, mu2);
            gl.glVertex2i(mu1, mu2 - 4);
            gl.glVertex2i(mu1, mu2 + 4);
  gl.glEnd();

  int mu3 = (int) (baseMu3 + MU_RECT_SIZE * (mu[2] + 1.5f) / 3.f);
  int mu4 = (int) (baseMu4 + MU_RECT_SIZE * (mu[3] + 1.5f) / 3.f);
  gl.glBegin(GL_LINES);
            gl.glVertex2i(mu3 - 4, mu4);
View Full Code Here

  gl.glBegin(GL_LINES);
            gl.glVertex2i(mu3 - 4, mu4);
            gl.glVertex2i(mu3 + 4, mu4);
            gl.glVertex2i(mu3, mu4 - 4);
            gl.glVertex2i(mu3, mu4 + 4);
  gl.glEnd();

        // info text
        textRenderer.beginRendering(width, height);
        textRenderer.draw(format("Epsilon %.5f - Max. Iter. %d", config.getEpsilon(), config.getMaxIterations()), 8, 10);
        textRenderer.draw(format("Mu = (%.3f, %.3f, %.3f, %.3f)", mu[0], mu[1], mu[2], mu[3]), 8, 25);
View Full Code Here

  gl.glBegin(GL_LINES);
            gl.glVertex2i(mu1 - 4, mu2);
            gl.glVertex2i(mu1 + 4, mu2);
            gl.glVertex2i(mu1, mu2 - 4);
            gl.glVertex2i(mu1, mu2 + 4);
  gl.glEnd();

  int mu3 = (int) (baseMu3 + MU_RECT_SIZE * (mu[2] + 1.5f) / 3.f);
  int mu4 = (int) (baseMu4 + MU_RECT_SIZE * (mu[3] + 1.5f) / 3.f);
  gl.glBegin(GL_LINES);
            gl.glVertex2i(mu3 - 4, mu4);
View Full Code Here

  gl.glBegin(GL_LINES);
            gl.glVertex2i(mu3 - 4, mu4);
            gl.glVertex2i(mu3 + 4, mu4);
            gl.glVertex2i(mu3, mu4 - 4);
            gl.glVertex2i(mu3, mu4 + 4);
  gl.glEnd();

        // info text
        textRenderer.beginRendering(width, height);
        textRenderer.draw(format("Epsilon %.5f - Max. Iter. %d", config.getEpsilon(), config.getMaxIterations()), 8, 10);
        textRenderer.draw(format("Mu = (%.3f, %.3f, %.3f, %.3f)", mu[0], mu[1], mu[2], mu[3]), 8, 25);
View Full Code Here

        gl.glRotated(20,20,0,20);
        gl.glBegin(GL2.GL_TRIANGLES);
        gl.glVertex3f(0.0f, 1.0f, 0.0f);
        gl.glVertex3f(-1.0f, -1.0f, 0.0f);
        gl.glVertex3f(1.0f, -1.0f, 0.0f);
        gl.glEnd();

        gl.glTranslatef(3.0f, 0.0f, 0.0f);
        gl.glColor3f(0f,255f,0f);
        gl.glRotated(-20,-20,0,-20);
        gl.glBegin(GL2.GL_QUADS);
View Full Code Here

        gl.glBegin(GL2.GL_QUADS);
        gl.glVertex3f(-1.0f, 1.0f, 0.0f);
        gl.glVertex3f(1.0f, 1.0f, 0.0f);
        gl.glVertex3f(1.0f, -1.0f, 0.0f);
        gl.glVertex3f(-1.0f, -1.0f, 0.0f);
        gl.glEnd();

        gl.glTranslatef(3.0f, 0.0f, 0.0f);
        gl.glColor3f(255f,200f,0f);
        gl.glRotated(45,45,0,45);
        gl.glBegin(GL2.GL_QUADS);
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.