/** 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));
 }
Exemplo n.º 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));
 }
Exemplo n.º 3
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));
 }
 /**
  * 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));
 }