All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.lwjgl.opengles.EXTOcclusionQueryBoolean Maven / Gradle / Ivy

Go to download

A royalty-free, cross-platform API for full-function 2D and 3D graphics on embedded systems - including consoles, phones, appliances and vehicles.

There is a newer version: 3.3.4
Show newest version
/*
 * Copyright LWJGL. All rights reserved.
 * License terms: https://www.lwjgl.org/license
 * MACHINE GENERATED FILE, DO NOT EDIT
 */
package org.lwjgl.opengles;

import java.nio.*;

import org.lwjgl.system.*;

import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.JNI.*;
import static org.lwjgl.system.MemoryStack.*;
import static org.lwjgl.system.MemoryUtil.*;

/**
 * Native bindings to the EXT_occlusion_query_boolean extension.
 * 
 * 

This extension defines a mechanism whereby an application can query whether any pixels (or, more precisely, samples) are drawn by a primitive or group * of primitives.

* *

The primary purpose of such a query (hereafter referred to as an "occlusion query") is to determine the visibility of an object. Typically, the * application will render the major occluders in the scene, then perform an occlusion query for each detail object in the scene. On subsequent frames, * the previous results of the occlusion queries can be used to decide whether to draw an object or not.

*/ public class EXTOcclusionQueryBoolean { /** Accepted by the {@code target} parameter of BeginQueryEXT, EndQueryEXT, and GetQueryivEXT. */ public static final int GL_ANY_SAMPLES_PASSED_EXT = 0x8C2F, GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT = 0x8D6A; /** Accepted by the {@code pname} parameter of GetQueryivEXT. */ public static final int GL_CURRENT_QUERY_EXT = 0x8865; /** Accepted by the {@code pname} parameter of GetQueryObjectivEXT and GetQueryObjectuivEXT. */ public static final int GL_QUERY_RESULT_EXT = 0x8866, GL_QUERY_RESULT_AVAILABLE_EXT = 0x8867; static { GLES.initialize(); } protected EXTOcclusionQueryBoolean() { throw new UnsupportedOperationException(); } static boolean isAvailable(GLESCapabilities caps) { return checkFunctions( caps.glGenQueriesEXT, caps.glDeleteQueriesEXT, caps.glIsQueryEXT, caps.glBeginQueryEXT, caps.glEndQueryEXT, caps.glGetQueryivEXT, caps.glGetQueryObjectuivEXT ); } // --- [ glGenQueriesEXT ] --- public static native void nglGenQueriesEXT(int n, long ids); public static void glGenQueriesEXT(IntBuffer ids) { nglGenQueriesEXT(ids.remaining(), memAddress(ids)); } public static int glGenQueriesEXT() { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { IntBuffer ids = stack.callocInt(1); nglGenQueriesEXT(1, memAddress(ids)); return ids.get(0); } finally { stack.setPointer(stackPointer); } } // --- [ glDeleteQueriesEXT ] --- public static native void nglDeleteQueriesEXT(int n, long ids); public static void glDeleteQueriesEXT(IntBuffer ids) { nglDeleteQueriesEXT(ids.remaining(), memAddress(ids)); } public static void glDeleteQueriesEXT(int id) { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { IntBuffer ids = stack.ints(id); nglDeleteQueriesEXT(1, memAddress(ids)); } finally { stack.setPointer(stackPointer); } } // --- [ glIsQueryEXT ] --- public static native boolean glIsQueryEXT(int id); // --- [ glBeginQueryEXT ] --- public static native void glBeginQueryEXT(int target, int id); // --- [ glEndQueryEXT ] --- public static native void glEndQueryEXT(int target); // --- [ glGetQueryivEXT ] --- public static native void nglGetQueryivEXT(int target, int pname, long params); public static void glGetQueryivEXT(int target, int pname, IntBuffer params) { if (CHECKS) { check(params, 1); } nglGetQueryivEXT(target, pname, memAddress(params)); } public static int glGetQueryiEXT(int target, int pname) { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { IntBuffer params = stack.callocInt(1); nglGetQueryivEXT(target, pname, memAddress(params)); return params.get(0); } finally { stack.setPointer(stackPointer); } } // --- [ glGetQueryObjectuivEXT ] --- public static native void nglGetQueryObjectuivEXT(int id, int pname, long params); public static void glGetQueryObjectuivEXT(int id, int pname, IntBuffer params) { if (CHECKS) { check(params, 1); } nglGetQueryObjectuivEXT(id, pname, memAddress(params)); } public static int glGetQueryObjectuiEXT(int id, int pname) { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { IntBuffer params = stack.callocInt(1); nglGetQueryObjectuivEXT(id, pname, memAddress(params)); return params.get(0); } finally { stack.setPointer(stackPointer); } } /** Array version of: {@link #glGenQueriesEXT GenQueriesEXT} */ public static void glGenQueriesEXT(int[] ids) { long __functionAddress = GLES.getICD().glGenQueriesEXT; if (CHECKS) { check(__functionAddress); } callPV(__functionAddress, ids.length, ids); } /** Array version of: {@link #glDeleteQueriesEXT DeleteQueriesEXT} */ public static void glDeleteQueriesEXT(int[] ids) { long __functionAddress = GLES.getICD().glDeleteQueriesEXT; if (CHECKS) { check(__functionAddress); } callPV(__functionAddress, ids.length, ids); } /** Array version of: {@link #glGetQueryivEXT GetQueryivEXT} */ public static void glGetQueryivEXT(int target, int pname, int[] params) { long __functionAddress = GLES.getICD().glGetQueryivEXT; if (CHECKS) { check(__functionAddress); check(params, 1); } callPV(__functionAddress, target, pname, params); } /** Array version of: {@link #glGetQueryObjectuivEXT GetQueryObjectuivEXT} */ public static void glGetQueryObjectuivEXT(int id, int pname, int[] params) { long __functionAddress = GLES.getICD().glGetQueryObjectuivEXT; if (CHECKS) { check(__functionAddress); check(params, 1); } callPV(__functionAddress, id, pname, params); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy