Java Code Examples for com.jogamp.opengl.GL4#glGetProgramPipelineInfoLog()

The following examples show how to use com.jogamp.opengl.GL4#glGetProgramPipelineInfoLog() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Gl_430_multi_draw_indirect.java    From jogl-samples with MIT License 6 votes vote down vote up
private void validate(GL4 gl4) {

        int[] status = {0};
        gl4.glValidateProgramPipeline(pipelineName.get(0));
        gl4.glGetProgramPipelineiv(pipelineName.get(0), GL_VALIDATE_STATUS, status, 0);

        if (status[0] != GL_TRUE) {
            int[] lengthMax = {0};
            gl4.glGetProgramPipelineiv(pipelineName.get(0), GL_INFO_LOG_LENGTH, lengthMax, 0);

            int[] lengthQuery = {0};
            byte[] infoLog = new byte[lengthMax[0] + 1];
            gl4.glGetProgramPipelineInfoLog(pipelineName.get(0), infoLog.length,
                    lengthQuery, 0,
                    infoLog, 0);

            gl4.glDebugMessageInsert(
                    GL_DEBUG_SOURCE_APPLICATION,
                    GL_DEBUG_TYPE_OTHER, 76,
                    GL_DEBUG_SEVERITY_LOW,
                    lengthQuery[0],
                    new String(infoLog).trim());
        }
    }
 
Example 2
Source File: Gl_500_multi_draw_indirect_arb.java    From jogl-samples with MIT License 6 votes vote down vote up
private void validate(GL4 gl4) {

        int[] status = {0};
        gl4.glValidateProgramPipeline(pipelineName.get(0));
        gl4.glGetProgramPipelineiv(pipelineName.get(0), GL_VALIDATE_STATUS, status, 0);

        if (status[0] != GL_TRUE) {

            int[] lengthMax = {0};
            gl4.glGetProgramPipelineiv(pipelineName.get(0), GL_INFO_LOG_LENGTH, lengthMax, 0);

            IntBuffer lengthQuery = GLBuffers.newDirectIntBuffer(1);
            ByteBuffer infoLog = GLBuffers.newDirectByteBuffer(lengthMax[0] + 1);
            gl4.glGetProgramPipelineInfoLog(pipelineName.get(0), infoLog.capacity(), lengthQuery, infoLog);

            gl4.glDebugMessageInsert(
                    GL_DEBUG_SOURCE_APPLICATION,
                    GL_DEBUG_TYPE_OTHER, 76,
                    GL_DEBUG_SEVERITY_LOW,
                    lengthQuery.get(0), new String(infoLog.array()).trim());
        }
    }
 
Example 3
Source File: Gl_500_multi_draw_indirect_count_arb.java    From jogl-samples with MIT License 6 votes vote down vote up
private void validate(GL4 gl4) {

        int[] status = {0};
        gl4.glValidateProgramPipeline(pipelineName[0]);
        gl4.glGetProgramPipelineiv(pipelineName[0], GL_VALIDATE_STATUS, status, 0);

        if (status[0] != GL_TRUE) {

            int[] lengthMax = {0};
            gl4.glGetProgramPipelineiv(pipelineName[0], GL_INFO_LOG_LENGTH, lengthMax, 0);

            int[] lengthQuery = {0};
            byte[] infoLog = new byte[lengthMax[0] + 1];
            gl4.glGetProgramPipelineInfoLog(pipelineName[0], infoLog.length, lengthQuery, 0, infoLog, 0);

            gl4.glDebugMessageInsert(
                    GL_DEBUG_SOURCE_APPLICATION,
                    GL_DEBUG_TYPE_OTHER, 76,
                    GL_DEBUG_SEVERITY_LOW,
                    lengthQuery[0], new String(infoLog).trim());
        }
    }
 
Example 4
Source File: Gl_440_multi_draw_indirect_id_arb.java    From jogl-samples with MIT License 6 votes vote down vote up
private void validate(GL4 gl4) {

        int[] status = {0};
        int[] lengthMax = {0};
        gl4.glValidateProgramPipeline(pipelineName.get(0));
        gl4.glGetProgramPipelineiv(pipelineName.get(0), GL_VALIDATE_STATUS, status, 0);
        gl4.glGetProgramPipelineiv(pipelineName.get(0), GL_INFO_LOG_LENGTH, lengthMax, 0);

        int[] lengthQuery = {0};
        byte[] infoLog = new byte[lengthMax[0] + 1];
        gl4.glGetProgramPipelineInfoLog(pipelineName.get(0), infoLog.length, lengthQuery, 0, infoLog, 0);

        gl4.glDebugMessageInsert(
                GL_DEBUG_SOURCE_APPLICATION,
                GL_DEBUG_TYPE_OTHER, 76,
                GL_DEBUG_SEVERITY_LOW,
                lengthQuery[0],
                new String(infoLog).trim());
    }