Example usage for org.lwjgl.opengl GL15 GL_QUERY_RESULT

List of usage examples for org.lwjgl.opengl GL15 GL_QUERY_RESULT

Introduction

In this page you can find the example usage for org.lwjgl.opengl GL15 GL_QUERY_RESULT.

Prototype

int GL_QUERY_RESULT

To view the source code for org.lwjgl.opengl GL15 GL_QUERY_RESULT.

Click Source Link

Document

Accepted by the pname parameter of GetQueryObjectiv and GetQueryObjectuiv.

Usage

From source file:jpcsp.graphics.RE.RenderingEngineLwjgl.java

License:Open Source License

@Override
public int getQueryResult(int id) {
    return GL15.glGetQueryObjecti(id, GL15.GL_QUERY_RESULT);
}

From source file:org.terasology.logic.world.Chunk.java

License:Apache License

public void applyOcclusionQueries() {
    for (int i = 0; i < VERTICAL_SEGMENTS; i++) {
        if (_queries[i] != 0) {
            int result = GL15.glGetQueryObjectui(_queries[i], GL15.GL_QUERY_RESULT_AVAILABLE);

            if (result != 0) {

                result = GL15.glGetQueryObjectui(_queries[i], GL15.GL_QUERY_RESULT);

                _occlusionCulled[i] = result <= 0;

                GL15.glDeleteQueries(_queries[i]);
                _queries[i] = 0;/*from  w  ww.java  2 s .c o m*/
            }
        }
    }
}