Examples of glGetError()


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

    public void checkCardError() throws Ardor3dException {
        final GL gl = GLContext.getCurrentGL();
        final GLU glu = new GLU();

        try {
            final int errorCode = gl.glGetError();
            if (errorCode != GL.GL_NO_ERROR) {
                throw new GLException(glu.gluErrorString(errorCode));
            }
        } catch (final GLException exception) {
            throw new Ardor3dException("Error in opengl: " + exception.getMessage(), exception);
View Full Code Here

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

                // ensure the buffer is ready for reading
                image.getData(0).rewind();
                final int error = glu.gluScaleImage(pixFormat, actualWidth, actualHeight, pixDataType,
                        image.getData(0), w, h, pixDataType, scaledImage);
                if (error != 0) {
                    final int errorCode = gl.glGetError();
                    if (errorCode != GL.GL_NO_ERROR) {
                        throw new GLException(glu.gluErrorString(errorCode));
                    }
                }
View Full Code Here

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

     * message.
     */
    private static void checkProgramError() {
        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 "
View Full Code Here

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

     * message.
     */
    private static void checkProgramError() {
        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 "
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.