Examples of glLoadIdentity()


Examples of javax.media.opengl.GL.glLoadIdentity()

        if (context.makeCurrent() == GLContext.CONTEXT_NOT_CURRENT) {
            throw new RuntimeException("Error making pbuffer's context current");
        }
        GL gl = pbuffer.getGL();
        gl.glMatrixMode(GL.GL_MODELVIEW);
        gl.glLoadIdentity();

        //Init
        drawable.initConfig(gl);
        vizConfig.setDisableLOD(true);
        engine.initScreenshot(gl, GLAbstractListener.glu);
View Full Code Here

Examples of javax.media.opengl.GL.glLoadIdentity()

            gl.glViewport(viewportX, viewportY, viewportW, viewportH);
            gl.glGetIntegerv(GL.GL_VIEWPORT, viewport);//Update viewport buffer

            gl.glMatrixMode(GL.GL_PROJECTION);
            gl.glLoadIdentity();
            glu.gluPerspective(viewField, aspectRatio, nearDistance, farDistance);
            gl.glGetDoublev(GL.GL_PROJECTION_MATRIX, projMatrix);//Update projection buffer


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

Examples of javax.media.opengl.GL.glLoadIdentity()

            glu.gluPerspective(viewField, aspectRatio, nearDistance, farDistance);
            gl.glGetDoublev(GL.GL_PROJECTION_MATRIX, projMatrix);//Update projection buffer


            gl.glMatrixMode(GL.GL_MODELVIEW);
            gl.glLoadIdentity();

            reshape3DScene(drawable.getGL());

            if (DEBUG) {
                DEBUG = false;
View Full Code Here

Examples of javax.media.opengl.GL.glLoadIdentity()

    drawFinished = true;
//    if (!rendering.tryLock()) return;

    gl.glMatrixMode( GL.GL_PROJECTION );
    gl.glLoadIdentity();
//    System.out.println("****** ASPECT: "+aspect);

    float nearplane = (float) (nav.viewer.length()-1.3);
    if (nearplane<0.00001f) nearplane=0.00001f;
    float farplane = 20.f;
View Full Code Here

Examples of javax.media.opengl.GL.glLoadIdentity()

    aspect = (float)width / (float)height;

    if (height <= 0) // avoid a divide by zero error!
      height = 1;
    gl.glMatrixMode(GL.GL_PROJECTION);
    gl.glLoadIdentity();
    gl.glViewport(0, 0, width, height);
    glu.gluPerspective(45.0f, aspect, 1.0, 20.0);
    gl.glMatrixMode(GL.GL_MODELVIEW);
    gl.glLoadIdentity();
View Full Code Here

Examples of javax.media.opengl.GL.glLoadIdentity()

    gl.glMatrixMode(GL.GL_PROJECTION);
    gl.glLoadIdentity();
    gl.glViewport(0, 0, width, height);
    glu.gluPerspective(45.0f, aspect, 1.0, 20.0);
    gl.glMatrixMode(GL.GL_MODELVIEW);
    gl.glLoadIdentity();

    System.err.println("GL_VENDOR: " + gl.glGetString(GL.GL_VENDOR));
    System.err.println("GL_RENDERER: " + gl.glGetString(GL.GL_RENDERER));
    System.err.println("GL_VERSION: " + gl.glGetString(GL.GL_VERSION));
  }
View Full Code Here

Examples of javax.media.opengl.GL.glLoadIdentity()

  public void draw(Point3D viewer, boolean viewculling, GLAutoDrawable drawable, Point3D direction, int layer, Dimension windowSize, boolean userInteraction) {
    if (layer!=1) return;

    GL gl = drawable.getGL();
    gl.glLoadIdentity();

    /* select all nodes that should be drawn
     *
     * it uses a branch and bound algorithm that determines based on
     * the current camera position how deep to descend in the tree
View Full Code Here

Examples of javax.media.opengl.GL.glLoadIdentity()

      // draw a sphere at geo 50,10
      GL gl = drawable.getGL();
      GLU glu = new GLU();
      GLUT glut = new GLUT();
     
      gl.glLoadIdentity();
      gl.glColor3f(1,1,1);
      gl.glEnable(GL.GL_COLOR_MATERIAL);
      gl.glDisable(GL.GL_TEXTURE_2D);
      gl.glDisable(GL.GL_DEPTH);
View Full Code Here

Examples of javax.media.opengl.GL.glLoadIdentity()

      // draw markers
      for(Marker marker : markers) {
//        Point3D center = getGlmain3d().getSphere().getPoint(marker.point);
        Point3D center = marker.getPoint();
       
        gl.glLoadIdentity();
        gl.glRasterPos3d(center.x, center.y, center.z);
        gl.glBitmap(0, 0, 0, 0, -marker.getIcon().getWidth()/2, 0, null); // move raster position
        gl.glDrawPixels(marker.getIcon().getWidth(), marker.getIcon().getHeight(), GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, marker.getIconBuffer());
//        gl.glBitmap(0, 0, 0, 0, icon.getWidth()/2, 0, null); // move raster position
//        glut.glutBitmapString(GLUT.BITMAP_HELVETICA_10, "TestTestTest");
View Full Code Here

Examples of javax.media.opengl.GL.glLoadIdentity()

                    context.makeCurrent();
                    GL gl = context.getGL();
                    gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_ACCUM_BUFFER_BIT
                            | GL.GL_STENCIL_BUFFER_BIT);
                    gl.glMatrixMode(GL.GL_PROJECTION);
                    gl.glLoadIdentity();
                    GLU glu = new GLU();
                    glu.gluPerspective(vport.getFOV(), vport.getAspect(), vport
                            .getMinZ(), vport.getMaxZ());
                    glu.gluLookAt(vport.getViewWorldX(), vport.getViewWorldY(),
                            -vport.getZ(), vport.getViewWorldX(), vport
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.