本文整理汇总了Java中com.jogamp.opengl.GL4.glGetQueryiv方法的典型用法代码示例。如果您正苦于以下问题:Java GL4.glGetQueryiv方法的具体用法?Java GL4.glGetQueryiv怎么用?Java GL4.glGetQueryiv使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jogamp.opengl.GL4
的用法示例。
在下文中一共展示了GL4.glGetQueryiv方法的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;
}
示例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;
}
示例3: begin
import com.jogamp.opengl.GL4; //导入方法依赖的package包/类
@Override
protected boolean begin(GL gl) {
GL4 gl4 = (GL4) gl;
boolean validated = true;
validated = validated && gl4.isExtensionAvailable("GL_ARB_query_buffer_object");
int[] queryCounter = {0};
gl4.glGetQueryiv(GL_ANY_SAMPLES_PASSED_CONSERVATIVE, GL_QUERY_COUNTER_BITS, queryCounter, 0);
assert (queryCounter[0] > 0);
viewports = new Vec4[4];
viewports[0] = new Vec4(windowSize.x * -0.5f, windowSize.y * -0.5f, windowSize.x * 0.5f, windowSize.y * 0.5f);
viewports[1] = new Vec4(0, 0, windowSize.x * 0.5f, windowSize.y * 0.5f);
viewports[2] = new Vec4(windowSize.x * 0.5f, windowSize.y * 0.5f, windowSize.x * 0.5f, windowSize.y * 0.5f);
viewports[3] = new Vec4(windowSize.x * 1.0f, windowSize.y * 1.0f, windowSize.x * 0.5f, windowSize.y * 0.5f);
if (validated) {
validated = initProgram(gl4);
}
if (validated) {
validated = initBuffer(gl4);
}
if (validated) {
validated = initVertexArray(gl4);
}
if (validated) {
validated = initQuery(gl4);
}
return validated && checkError(gl4, "begin");
}
示例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 && checkError(gl4, "initQuery");
}
示例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);
boolean validated = queryBits[0] >= 1;
return validated;
}
示例6: 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;
}
示例7: 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;
}