Package javax.media.opengl

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


        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

    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

        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

        }

        // 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

        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

        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

    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

      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

         int[] greenBits   = new int[1];
         int[] blueBits   = new int[1];
         int[] alphaBits   = new int[1];
         int[] stencilBits   = new int[1];
         int[] depthBits   = new int[1];
         gl.glGetIntegerv(GL.GL_RED_BITS, redBits,0);
         gl.glGetIntegerv(GL.GL_GREEN_BITS, greenBits,0);
         gl.glGetIntegerv(GL.GL_BLUE_BITS, blueBits,0);
         gl.glGetIntegerv(GL.GL_ALPHA_BITS, alphaBits,0);
         gl.glGetIntegerv(GL.GL_STENCIL_BITS, stencilBits,0);
         gl.glGetIntegerv(GL.GL_DEPTH_BITS, depthBits,0);
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.