/** * <a href="http://www.opengl.org/sdk/docs/man/xhtml/glDrawRangeElements.xml">OpenGL SDK * Reference</a> * * <p>A restricted form of {@link GL11#glDrawElements DrawElements}. mode, start, end, and count * match the corresponding arguments to glDrawElements, with the additional constraint that all * values in the arrays count must lie between start and end, inclusive. * * <p>Implementations denote recommended maximum amounts of vertex and index data, which may be * queried by calling glGet with argument {@link #GL_MAX_ELEMENTS_VERTICES MAX_ELEMENTS_VERTICES} * and {@link #GL_MAX_ELEMENTS_INDICES MAX_ELEMENTS_INDICES}. If end - start + 1 is greater than * the value of GL_MAX_ELEMENTS_VERTICES, or if count is greater than the value of * GL_MAX_ELEMENTS_INDICES, then the call may operate at reduced performance. There is no * requirement that all vertices in the range start end be referenced. However, the implementation * may partially process unused vertices, reducing performance from what could be achieved with an * optimal index set. * * <p>When glDrawRangeElements is called, it uses count sequential elements from an enabled array, * starting at start to construct a sequence of geometric primitives. mode specifies what kind of * primitives are constructed, and how the array elements construct these primitives. If more than * one array is enabled, each is used. * * <p>Vertex attributes that are modified by glDrawRangeElements have an unspecified value after * glDrawRangeElements returns. Attributes that aren't modified maintain their previous values. * * <h3>Errors</h3> * * It is an error for indices to lie outside the range start end, but implementations may not * check for this situation. Such indices cause implementation-dependent behavior. * * <ul> * <li>GL_INVALID_ENUM is generated if mode is not an accepted value. * <li>GL_INVALID_VALUE is generated if count is negative. * <li>GL_INVALID_VALUE is generated if end < start. * <li>GL_INVALID_OPERATION is generated if a geometry shader is active and mode is incompatible * with the input primitive type of the geometry shader in the currently installed program * object. * <li>GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an enabled * array or the element array and the buffer object's data store is currently mapped. * </ul> * * @param mode the kind of primitives to render. One of: * <p>{@link GL11#GL_POINTS POINTS}, {@link GL11#GL_LINE_STRIP LINE_STRIP}, {@link * GL11#GL_LINE_LOOP LINE_LOOP}, {@link GL11#GL_LINES LINES}, {@link GL11#GL_POLYGON POLYGON}, * {@link GL11#GL_TRIANGLE_STRIP TRIANGLE_STRIP}, {@link GL11#GL_TRIANGLE_FAN TRIANGLE_FAN}, * {@link GL11#GL_TRIANGLES TRIANGLES}, {@link GL11#GL_QUAD_STRIP QUAD_STRIP}, {@link * GL11#GL_QUADS QUADS}, {@link GL32#GL_LINES_ADJACENCY LINES_ADJACENCY}, {@link * GL32#GL_LINE_STRIP_ADJACENCY LINE_STRIP_ADJACENCY}, {@link GL32#GL_TRIANGLES_ADJACENCY * TRIANGLES_ADJACENCY}, {@link GL32#GL_TRIANGLE_STRIP_ADJACENCY TRIANGLE_STRIP_ADJACENCY}, * {@link GL40#GL_PATCHES PATCHES} * @param start the minimum array index contained in {@code indices} * @param end the maximum array index contained in {@code indices} * @param count the number of elements to be rendered * @param type the type of the values in {@code indices}. One of: * <p>{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}, {@link GL11#GL_UNSIGNED_SHORT * UNSIGNED_SHORT}, {@link GL11#GL_UNSIGNED_INT UNSIGNED_INT} * @param indices a pointer to the location where the indices are stored */ public static void glDrawRangeElements( int mode, int start, int end, int count, int type, ByteBuffer indices) { if (LWJGLUtil.CHECKS) { checkBuffer(indices, count / GLChecks.typeToBytes(type)); GLChecks.ensureBufferObject(GL15.GL_ELEMENT_ARRAY_BUFFER_BINDING, false); } nglDrawRangeElements(mode, start, end, count, type, memAddress(indices)); }
/** Alternative version of: {@link #glDrawRangeElements DrawRangeElements} */ public static void glDrawRangeElements( int mode, int start, int end, int type, ByteBuffer indices) { if (LWJGLUtil.CHECKS) GLChecks.ensureBufferObject(GL15.GL_ELEMENT_ARRAY_BUFFER_BINDING, true); nglDrawRangeElements( mode, start, end, indices.remaining() * GLChecks.typeToBytes(type), type, memAddress(indices)); }
/** DoubleBuffer version of: {@link #glTexSubImage3D TexSubImage3D} */ public static void glTexSubImage3D( int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, DoubleBuffer pixels) { if (LWJGLUtil.CHECKS) GLChecks.ensureBufferObject(GL21.GL_PIXEL_UNPACK_BUFFER_BINDING, false); nglTexSubImage3D( target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, memAddress(pixels)); }
/** Alternative version of: {@link #wglGetGPUInfoAMD GetGPUInfoAMD} */ public static int wglGetGPUInfoAMD(int id, int property, int dataType, ByteBuffer data) { return nwglGetGPUInfoAMD( id, property, dataType, data.remaining() * GLChecks.typeToBytes(dataType), memAddress(data)); }
/** int[] version of: {@link #glVertexAttribIPointerEXT VertexAttribIPointerEXT} */ public static void glVertexAttribIPointerEXT( int index, int size, int type, int stride, int[] pointer) { long __functionAddress = GL.getCapabilities().glVertexAttribIPointerEXT; if (CHECKS) { checkFunctionAddress(__functionAddress); GLChecks.ensureBufferObject(GL15.GL_ARRAY_BUFFER_BINDING, false); } callPV(__functionAddress, index, size, type, stride, pointer); }
/** Buffer object offset version of: {@link #glTexImage3D TexImage3D} */ public static void glTexImage3D( int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, long pixelsOffset) { if (LWJGLUtil.CHECKS) GLChecks.ensureBufferObject(GL21.GL_PIXEL_UNPACK_BUFFER_BINDING, true); nglTexImage3D( target, level, internalformat, width, height, depth, border, format, type, pixelsOffset); }
/** DoubleBuffer version of: {@link #glTexImage3D TexImage3D} */ public static void glTexImage3D( int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, DoubleBuffer pixels) { if (LWJGLUtil.CHECKS) GLChecks.ensureBufferObject(GL21.GL_PIXEL_UNPACK_BUFFER_BINDING, false); nglTexImage3D( target, level, internalformat, width, height, depth, border, format, type, memAddressSafe(pixels)); }
/** GL_UNSIGNED_INT version of: {@link #glDrawRangeElements DrawRangeElements} */ public static void glDrawRangeElements(int mode, int start, int end, IntBuffer indices) { if (LWJGLUtil.CHECKS) GLChecks.ensureBufferObject(GL15.GL_ELEMENT_ARRAY_BUFFER_BINDING, false); nglDrawRangeElements( mode, start, end, indices.remaining(), GL11.GL_UNSIGNED_INT, memAddress(indices)); }
/** Buffer object offset version of: {@link #glDrawRangeElements DrawRangeElements} */ public static void glDrawRangeElements( int mode, int start, int end, int count, int type, long indicesOffset) { if (LWJGLUtil.CHECKS) GLChecks.ensureBufferObject(GL15.GL_ELEMENT_ARRAY_BUFFER_BINDING, true); nglDrawRangeElements(mode, start, end, count, type, indicesOffset); }
/** IntBuffer version of: {@link #glVertexAttribIPointerEXT VertexAttribIPointerEXT} */ public static void glVertexAttribIPointerEXT( int index, int size, int type, int stride, IntBuffer pointer) { if (CHECKS) GLChecks.ensureBufferObject(GL15.GL_ARRAY_BUFFER_BINDING, false); nglVertexAttribIPointerEXT(index, size, type, stride, memAddress(pointer)); }
/** * Specifies the location and organization of a pure integer vertex attribute array. * * @param index the index of the pure integer generic vertex attribute to be modified * @param size the number of values per vertex that are stored in the array. The initial value is * 4. One of:<br> * <table><tr><td>1</td><td>2</td><td>3</td><td>4</td><td>{@link GL12#GL_BGRA BGRA}</td></tr> * </table> * * @param type the data type of each component in the array. One of:<br> * <table> * <tr><td>{@link GL11#GL_BYTE BYTE}</td><td>{@link GL11#GL_UNSIGNED_BYTE UNSIGNED_BYTE}</td><td>{@link GL11#GL_SHORT SHORT}</td><td>{@link GL11#GL_UNSIGNED_SHORT UNSIGNED_SHORT}</td><td>{@link GL11#GL_INT INT}</td><td>{@link GL11#GL_UNSIGNED_INT UNSIGNED_INT}</td></tr> * </table> * * @param stride the byte offset between consecutive generic vertex attributes. If stride is 0, * the generic vertex attributes are understood to be tightly packed in the array. The initial * value is 0. * @param pointer the vertex attribute data or the offset of the first component of the first * generic vertex attribute in the array in the data store of the buffer currently bound to * the {@link GL15#GL_ARRAY_BUFFER ARRAY_BUFFER} target. The initial value is 0. */ public static void glVertexAttribIPointerEXT( int index, int size, int type, int stride, long pointer) { if (CHECKS) GLChecks.ensureBufferObject(GL15.GL_ARRAY_BUFFER_BINDING, true); nglVertexAttribIPointerEXT(index, size, type, stride, pointer); }
/** * Each GPU in a system may have different properties, performance characteristics and different * supported OpenGL versions. Use this function to determine which GPU is best suited for a * specific task. * * <p>For a string, {@code size} will be the number of characters allocated and will include NULL * termination. For arrays of type GL_UNSIGNED_INT, GL_INT, and GL_FLOAT {@code size} will be the * array depth. If the function succeeds, the number of values written will be returned. If the * number of values written is equal to {@code size}, the query should be repeated with a larger * {@code data} buffer. Strings should be queried using the GL_UNSIGNED_BYTE type, are UTF-8 * encoded and will be NULL terminated. If the function fails, -1 will be returned. * * @param id a GPU id obtained from calling {@link #wglGetGPUIDsAMD GetGPUIDsAMD} * @param property the information being queried. One of:<br> * {@link #WGL_GPU_VENDOR_AMD GPU_VENDOR_AMD}, {@link #WGL_GPU_RENDERER_STRING_AMD * GPU_RENDERER_STRING_AMD}, {@link #WGL_GPU_OPENGL_VERSION_STRING_AMD * GPU_OPENGL_VERSION_STRING_AMD}, {@link #WGL_GPU_FASTEST_TARGET_GPUS_AMD * GPU_FASTEST_TARGET_GPUS_AMD}, {@link #WGL_GPU_RAM_AMD GPU_RAM_AMD}, {@link * #WGL_GPU_CLOCK_AMD GPU_CLOCK_AMD}, {@link #WGL_GPU_NUM_PIPES_AMD GPU_NUM_PIPES_AMD}, {@link * #WGL_GPU_NUM_SIMD_AMD GPU_NUM_SIMD_AMD}, {@link #WGL_GPU_NUM_RB_AMD GPU_NUM_RB_AMD}, {@link * #WGL_GPU_NUM_SPI_AMD GPU_NUM_SPI_AMD} * @param dataType the data type to be returned. One of:<br> * {@link GL11#GL_UNSIGNED_INT}, {@link GL11#GL_INT}, {@link GL11#GL_FLOAT}, {@link * GL11#GL_UNSIGNED_BYTE} * @param size the size of the {@code data} buffer * @param data the buffer which will be filled with the requested information */ public static int wglGetGPUInfoAMD( int id, int property, int dataType, int size, ByteBuffer data) { if (LWJGLUtil.CHECKS) checkBuffer(data, size / GLChecks.typeToBytes(dataType)); return nwglGetGPUInfoAMD(id, property, dataType, size, memAddress(data)); }