当前位置: 首页>>代码示例>>Java>>正文


Java GL4.glGenQueries方法代码示例

本文整理汇总了Java中com.jogamp.opengl.GL4.glGenQueries方法的典型用法代码示例。如果您正苦于以下问题:Java GL4.glGenQueries方法的具体用法?Java GL4.glGenQueries怎么用?Java GL4.glGenQueries使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.jogamp.opengl.GL4的用法示例。


在下文中一共展示了GL4.glGenQueries方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initQuery

import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initQuery(GL4 gl4) {

        gl4.glGenQueries(Statistics.MAX, queryName);

        int[] queryCounterBits = new int[Statistics.MAX];

        gl4.glGetQueryiv(GL_VERTICES_SUBMITTED_ARB, GL_QUERY_COUNTER_BITS, queryCounterBits,
                Statistics.VERTICES_SUBMITTED);
        gl4.glGetQueryiv(GL_PRIMITIVES_SUBMITTED_ARB, GL_QUERY_COUNTER_BITS, queryCounterBits,
                Statistics.PRIMITIVES_SUBMITTED);
        gl4.glGetQueryiv(GL_VERTEX_SHADER_INVOCATIONS_ARB, GL_QUERY_COUNTER_BITS, queryCounterBits,
                Statistics.VERTEX_SHADER_INVOCATIONS);
        gl4.glGetQueryiv(GL_TESS_CONTROL_SHADER_PATCHES_ARB, GL_QUERY_COUNTER_BITS, queryCounterBits,
                Statistics.TESS_CONTROL_SHADER_PATCHES);
        gl4.glGetQueryiv(GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB, GL_QUERY_COUNTER_BITS, queryCounterBits,
                Statistics.TESS_EVALUATION_SHADER_INVOCATIONS);
        gl4.glGetQueryiv(GL_GEOMETRY_SHADER_INVOCATIONS, GL_QUERY_COUNTER_BITS, queryCounterBits,
                Statistics.GEOMETRY_SHADER_INVOCATIONS);
        gl4.glGetQueryiv(GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB, GL_QUERY_COUNTER_BITS, queryCounterBits,
                Statistics.GEOMETRY_SHADER_PRIMITIVES_EMITTED);
        gl4.glGetQueryiv(GL_FRAGMENT_SHADER_INVOCATIONS_ARB, GL_QUERY_COUNTER_BITS, queryCounterBits,
                Statistics.FRAGMENT_SHADER_INVOCATIONS);
        gl4.glGetQueryiv(GL_COMPUTE_SHADER_INVOCATIONS_ARB, GL_QUERY_COUNTER_BITS, queryCounterBits,
                Statistics.COMPUTE_SHADER_INVOCATIONS);
        gl4.glGetQueryiv(GL_CLIPPING_INPUT_PRIMITIVES_ARB, GL_QUERY_COUNTER_BITS, queryCounterBits,
                Statistics.CLIPPING_INPUT_PRIMITIVES);
        gl4.glGetQueryiv(GL_CLIPPING_OUTPUT_PRIMITIVES_ARB, GL_QUERY_COUNTER_BITS, queryCounterBits,
                Statistics.CLIPPING_OUTPUT_PRIMITIVES);

        boolean validated = true;
        for (int i = 0; i < queryCounterBits.length; ++i) {
            validated = validated && queryCounterBits[i] >= 18;
        }

        return validated;
    }
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:37,代码来源:Gl_450_query_statistics_arb.java

示例2: initQuery

import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initQuery(GL4 gl4) {

        gl4.glGenQueries(1, queryName);

        IntBuffer queryBitsBuffer = GLBuffers.newDirectIntBuffer(1);
        gl4.glGetQueryiv(GL_PRIMITIVES_GENERATED, GL_QUERY_COUNTER_BITS, queryBitsBuffer);
        int queryBits = queryBitsBuffer.get(0);
        BufferUtils.destroyDirectBuffer(queryBitsBuffer);

        return queryBits >= 32;
    }
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:12,代码来源:Gl_500_primitive_shading_nv.java

示例3: initQuery

import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initQuery(GL4 gl4) {

        gl4.glGenQueries(1, queryName);

        int[] queryBits = {0};
        gl4.glGetQueryiv(GL_ANY_SAMPLES_PASSED_CONSERVATIVE, GL_QUERY_COUNTER_BITS, queryBits, 0);

        boolean validated = queryBits[0] >= 1;

        return validated && checkError(gl4, "initQuery");
    }
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:12,代码来源:Gl_430_query_conditional.java

示例4: initQuery

import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initQuery(GL4 gl4) {

        gl4.glGenQueries(1, queryName);

        int[] queryBits = {0};
        gl4.glGetQueryiv(GL_ANY_SAMPLES_PASSED_CONSERVATIVE, GL_QUERY_COUNTER_BITS, queryBits, 0);

        boolean validated = queryBits[0] >= 1;

        return validated;
    }
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:12,代码来源:Gl_430_query_occlusion.java

示例5: initQuery

import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initQuery(GL4 gl4) {

        gl4.glGenQueries(1, queryName);

        int[] queryBits = {0};
        gl4.glGetQueryiv(GL_ANY_SAMPLES_PASSED_CONSERVATIVE, GL_QUERY_COUNTER_BITS, queryBits, 0);

        return queryBits[0] >= 1;
    }
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:10,代码来源:Gl_450_query_conditional.java

示例6: initQuery

import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initQuery(GL4 gl4) {

        gl4.glGenQueries(1, queryName);

        int[] queryBits = {0};
        gl4.glGetQueryiv(GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB, GL_QUERY_COUNTER_BITS, queryBits, 0);

        return queryBits[0] >= 1;
    }
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:10,代码来源:Gl_450_transform_feedback_arb.java

示例7: initQuery

import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
private boolean initQuery(GL4 gl4) {

        gl4.glGenQueries(queryName.capacity(), queryName);

        return checkError(gl4, "initQuery");
    }
 
开发者ID:java-opengl-labs,项目名称:jogl-samples,代码行数:7,代码来源:Gl_440_query_occlusion.java


注:本文中的com.jogamp.opengl.GL4.glGenQueries方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。