Пример #1
0
 /** 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));
 }
Пример #2
0
 /**
  * <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 &lt; 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));
 }
Пример #3
0
 /** 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);
 }
Пример #4
0
 /** 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));
 }
Пример #5
0
 /** 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);
 }
Пример #6
0
 /** 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));
 }
Пример #7
0
 /** 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));
 }
Пример #8
0
 /** 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);
 }
Пример #9
0
 /** 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));
 }
Пример #10
0
 /**
  * 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);
 }