Examples of glMatrixMode()


Examples of com.badlogic.gdx.graphics.GL10.glMatrixMode()

  }

  private void setupMatrices () {
    if(!Gdx.graphics.isGL20Available()) {
      GL10 gl = Gdx.gl10;
      gl.glMatrixMode(GL10.GL_PROJECTION);
      gl.glLoadMatrixf(projectionMatrix.val, 0);
      gl.glMatrixMode(GL10.GL_MODELVIEW);
      gl.glLoadMatrixf(transformMatrix.val, 0);
    } else {
      combinedMatrix.set(projectionMatrix).mul(transformMatrix);
View Full Code Here

Examples of com.badlogic.gdx.graphics.GL10.glMatrixMode()

  private void setupMatrices () {
    if(!Gdx.graphics.isGL20Available()) {
      GL10 gl = Gdx.gl10;
      gl.glMatrixMode(GL10.GL_PROJECTION);
      gl.glLoadMatrixf(projectionMatrix.val, 0);
      gl.glMatrixMode(GL10.GL_MODELVIEW);
      gl.glLoadMatrixf(transformMatrix.val, 0);
    } else {
      combinedMatrix.set(projectionMatrix).mul(transformMatrix);
      if (customShader != null) {
        customShader.setUniformMatrix("u_proj", projectionMatrix);
View Full Code Here

Examples of com.badlogic.gdx.graphics.GL10.glMatrixMode()

  }

  private void setupMatrices () {
    if (!Gdx.graphics.isGL20Available()) {
      GL10 gl = Gdx.gl10;
      gl.glMatrixMode(GL10.GL_PROJECTION);
      gl.glLoadMatrixf(projectionMatrix.val, 0);
      gl.glMatrixMode(GL10.GL_MODELVIEW);
      gl.glLoadMatrixf(transformMatrix.val, 0);
    } else {
      combinedMatrix.set(projectionMatrix).mul(transformMatrix);
View Full Code Here

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

        GLContext context = pbuffer.getContext();
        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);
View Full Code Here

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

            GL gl = drawable.getGL();

            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

View Full Code Here

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

            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) {
View Full Code Here

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

    Global.treelock.writeLock().lock();

    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;
View Full Code Here

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

    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.glMatrixMode()

      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();

    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.glMatrixMode()

                    canvas.setCurrent();
                    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(),
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.