Examples of glGetIntegerv()


Examples of com.badlogic.gdx.graphics.GL20.glGetIntegerv()

    // iOS uses a different framebuffer handle! (not necessarily 0)
    if (!defaultFramebufferHandleInitialized) {
      defaultFramebufferHandleInitialized = true;
      if (Gdx.app.getType() == ApplicationType.iOS) {
        IntBuffer intbuf = ByteBuffer.allocateDirect(16 * Integer.SIZE / 8).order(ByteOrder.nativeOrder()).asIntBuffer();
        gl.glGetIntegerv(GL20.GL_FRAMEBUFFER_BINDING, intbuf);
        defaultFramebufferHandle = intbuf.get(0);
      } else {
        defaultFramebufferHandle = 0;
      }
    }
View Full Code Here

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

            viewportY = ((height - viewportH) / 2);

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

        gl.glDisable(GL.GL_TEXTURE_2D);
        gl.glDisable(GL.GL_DEPTH_TEST);

        // Retrieve the current viewport and switch to orthographic mode
        IntBuffer viewPort = BufferUtil.newIntBuffer(4);
        gl.glGetIntegerv(GL.GL_VIEWPORT, viewPort);
        glu.gluOrtho2D(0, viewPort.get(2), viewPort.get(3), 0);

        // Render the text
        gl.glColor3f(1, 1, 1);
View Full Code Here

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

    int getNumCtxLights(Context ctx) {
        if (VERBOSE) System.err.println("JoglPipeline.getNumCtxLights()");

        GL gl = context(ctx).getGL();
        int[] res = new int[1];
        gl.glGetIntegerv(GL2.GL_MAX_LIGHTS, res, 0);
        return res[0];
    }

    // Native method for decal 1st child setup
    @Override
View Full Code Here

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

        gl.glDisable(GL.GL_TEXTURE_2D);
        gl.glDisable(GL.GL_DEPTH_TEST);

        // Retrieve the current viewport and switch to orthographic mode
        IntBuffer viewPort = BufferUtil.newIntBuffer(4);
        gl.glGetIntegerv(GL.GL_VIEWPORT, viewPort);
        glu.gluOrtho2D(0, viewPort.get(2), viewPort.get(3), 0);

        // Render the text
        gl.glColor3f(1, 1, 1);
View Full Code Here

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

        }

        // Determine the original texture configuration, so that this method can
        // restore the texture configuration to its original state.
        final int origAlignment[] = new int[1];
        gl.glGetIntegerv(GL.GL_UNPACK_ALIGNMENT, origAlignment, 0);
        final int origRowLength = 0;
        final int origImageHeight = 0;
        final int origSkipPixels = 0;
        final int origSkipRows = 0;
        final int origSkipImages = 0;
View Full Code Here

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

        final GL gl = GLContext.getCurrentGL();

        if (gl.glGetError() == GL.GL_INVALID_OPERATION) {
            // retrieve the error position
            final IntBuffer errorloc = BufferUtils.createIntBuffer(16);
            gl.glGetIntegerv(GL2.GL_PROGRAM_ERROR_POSITION_ARB, errorloc); // TODO Check for integer

            logger.severe("Error " + gl.glGetString(GL2.GL_PROGRAM_ERROR_STRING_ARB) + " in vertex program on line "
                    + errorloc.get(0));
        }
    }
View Full Code Here

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

        final GL gl = GLContext.getCurrentGL();

        if (gl.glGetError() == GL.GL_INVALID_OPERATION) {
            // retrieve the error position
            final IntBuffer errorloc = BufferUtils.createIntBuffer(16);
            gl.glGetIntegerv(GL2.GL_PROGRAM_ERROR_POSITION_ARB, errorloc); // TODO Check for integer

            logger.severe("Error " + gl.glGetString(GL2.GL_PROGRAM_ERROR_STRING_ARB) + " in fragment program on line "
                    + errorloc.get(0));
        }
    }
View Full Code Here

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

    worldRenderer.init(gl, shapeManager);
    shapeRenderer.shapeManager_$eq(shapeManager);

    // Check for stencil support
    int StencilBits[] = new int[1];
    gl.glGetIntegerv(GL.GL_STENCIL_BITS, IntBuffer.wrap(StencilBits));
    shapeRenderer.stencilSupport_$eq(StencilBits[0] > 0);
  }

  public void reshape(GLAutoDrawable gLDrawable, int x, int y, int width, int height) {
    GL gl = gLDrawable.getGL();
View Full Code Here

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

      try{
      PGraphicsOpenGL pgl = ((PGraphicsOpenGL)applet.g);
      GL gl = pgl.beginGL()
      GLU glu = pgl.glu;
     
          gl.glGetIntegerv(GL.GL_VIEWPORT, viewport, 0);
          gl.glGetDoublev(GL.GL_PROJECTION_MATRIX, proj, 0);
          gl.glGetDoublev(GL.GL_MODELVIEW_MATRIX, model, 0);
         
          /*
          System.out.println("OpenGL ProjectionMatrix: ");
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.