/** Array version of: {@link #glGetPerfQueryInfoINTEL GetPerfQueryInfoINTEL} */
 public static void glGetPerfQueryInfoINTEL(
     int queryId,
     ByteBuffer queryName,
     int[] dataSize,
     int[] noCounters,
     int[] noInstances,
     int[] capsMask) {
   long __functionAddress = GLES.getCapabilities().glGetPerfQueryInfoINTEL;
   if (CHECKS) {
     checkFunctionAddress(__functionAddress);
     checkBuffer(dataSize, 1);
     checkBuffer(noCounters, 1);
     checkBuffer(noInstances, 1);
     checkBuffer(capsMask, 1);
   }
   callPPPPPV(
       __functionAddress,
       queryId,
       queryName.remaining(),
       memAddress(queryName),
       dataSize,
       noCounters,
       noInstances,
       capsMask);
 }
 public static void glGetPerfCounterInfoINTEL(
     int queryId,
     int counterId,
     ByteBuffer counterName,
     ByteBuffer counterDesc,
     IntBuffer counterOffset,
     IntBuffer counterDataSize,
     IntBuffer counterTypeEnum,
     IntBuffer counterDataTypeEnum,
     LongBuffer rawCounterMaxValue) {
   if (CHECKS) {
     checkBuffer(counterOffset, 1);
     checkBuffer(counterDataSize, 1);
     checkBuffer(counterTypeEnum, 1);
     checkBuffer(counterDataTypeEnum, 1);
     checkBuffer(rawCounterMaxValue, 1);
   }
   nglGetPerfCounterInfoINTEL(
       queryId,
       counterId,
       counterName.remaining(),
       memAddress(counterName),
       counterDesc.remaining(),
       memAddress(counterDesc),
       memAddress(counterOffset),
       memAddress(counterDataSize),
       memAddress(counterTypeEnum),
       memAddress(counterDataTypeEnum),
       memAddress(rawCounterMaxValue));
 }
 /** Array version of: {@link #glGetPerfCounterInfoINTEL GetPerfCounterInfoINTEL} */
 public static void glGetPerfCounterInfoINTEL(
     int queryId,
     int counterId,
     ByteBuffer counterName,
     ByteBuffer counterDesc,
     int[] counterOffset,
     int[] counterDataSize,
     int[] counterTypeEnum,
     int[] counterDataTypeEnum,
     long[] rawCounterMaxValue) {
   long __functionAddress = GLES.getCapabilities().glGetPerfCounterInfoINTEL;
   if (CHECKS) {
     checkFunctionAddress(__functionAddress);
     checkBuffer(counterOffset, 1);
     checkBuffer(counterDataSize, 1);
     checkBuffer(counterTypeEnum, 1);
     checkBuffer(counterDataTypeEnum, 1);
     checkBuffer(rawCounterMaxValue, 1);
   }
   callPPPPPPPV(
       __functionAddress,
       queryId,
       counterId,
       counterName.remaining(),
       memAddress(counterName),
       counterDesc.remaining(),
       memAddress(counterDesc),
       counterOffset,
       counterDataSize,
       counterTypeEnum,
       counterDataTypeEnum,
       rawCounterMaxValue);
 }
예제 #4
0
 /** Array version of: {@link #stbi_info_from_memory info_from_memory} */
 public static int stbi_info_from_memory(ByteBuffer buffer, int[] x, int[] y, int[] comp) {
   if (CHECKS) {
     checkBuffer(x, 1);
     checkBuffer(y, 1);
     checkBuffer(comp, 1);
   }
   return nstbi_info_from_memory(memAddress(buffer), buffer.remaining(), x, y, comp);
 }
 public static void glGetPerfMonitorGroupStringAMD(
     int group, int bufSize, ByteBuffer length, ByteBuffer groupString) {
   if (LWJGLUtil.CHECKS) {
     checkBuffer(groupString, bufSize);
     checkBuffer(length, 1 << 2);
   }
   nglGetPerfMonitorGroupStringAMD(group, bufSize, memAddress(length), memAddress(groupString));
 }
 public static void glGetPerfMonitorGroupsAMD(
     ByteBuffer numGroups, int groupsSize, ByteBuffer groups) {
   if (LWJGLUtil.CHECKS) {
     if (numGroups != null) checkBuffer(numGroups, 1 << 2);
     if (groups != null) checkBuffer(groups, groupsSize << 2);
   }
   nglGetPerfMonitorGroupsAMD(memAddressSafe(numGroups), groupsSize, memAddressSafe(groups));
 }
 public static void glGetPerfMonitorCounterDataAMD(
     int monitor, int pname, int dataSize, ByteBuffer data, ByteBuffer bytesWritten) {
   if (LWJGLUtil.CHECKS) {
     checkBuffer(data, dataSize << 2);
     if (bytesWritten != null) checkBuffer(bytesWritten, 1 << 2);
   }
   nglGetPerfMonitorCounterDataAMD(
       monitor, pname, dataSize, memAddress(data), memAddressSafe(bytesWritten));
 }
 public static void glGetPerfMonitorCounterStringAMD(
     int group, int counter, int bufSize, ByteBuffer length, ByteBuffer counterString) {
   if (LWJGLUtil.CHECKS) {
     if (counterString != null) checkBuffer(counterString, bufSize);
     if (length != null) checkBuffer(length, 1 << 2);
   }
   nglGetPerfMonitorCounterStringAMD(
       group, counter, bufSize, memAddressSafe(length), memAddressSafe(counterString));
 }
예제 #9
0
 /**
  * Returns image dimensions &amp; components without fully decoding the image.
  *
  * @param filename the file name
  * @param x outputs the image width in pixels
  * @param y outputs the image height in pixels
  * @param comp outputs number of components in image
  * @return 1 on success, 0 on failure
  */
 public static int stbi_info(ByteBuffer filename, IntBuffer x, IntBuffer y, IntBuffer comp) {
   if (CHECKS) {
     checkNT1(filename);
     checkBuffer(x, 1);
     checkBuffer(y, 1);
     checkBuffer(comp, 1);
   }
   return nstbi_info(memAddress(filename), memAddress(x), memAddress(y), memAddress(comp));
 }
 /**
  * Queries the name of an active shader subroutine.
  *
  * @param program the name of the program containing the subroutine
  * @param shadertype the shader stage from which to query the subroutine name. One of:<br>
  *     {@link GL20#GL_VERTEX_SHADER VERTEX_SHADER}, {@link GL20#GL_FRAGMENT_SHADER
  *     FRAGMENT_SHADER}, {@link GL32#GL_GEOMETRY_SHADER GEOMETRY_SHADER}, {@link
  *     #GL_TESS_CONTROL_SHADER TESS_CONTROL_SHADER}, {@link #GL_TESS_EVALUATION_SHADER
  *     TESS_EVALUATION_SHADER}
  * @param index the index of the shader subroutine uniform
  * @param bufsize the size of the buffer whose address is given in {@code name}
  * @param length a variable which is to receive the length of the shader subroutine uniform name
  * @param name an array into which the name of the shader subroutine uniform will be written
  */
 public static void glGetActiveSubroutineName(
     int program, int shadertype, int index, int bufsize, ByteBuffer length, ByteBuffer name) {
   if (LWJGLUtil.CHECKS) {
     checkBuffer(name, bufsize);
     if (length != null) checkBuffer(length, 1 << 2);
   }
   nglGetActiveSubroutineName(
       program, shadertype, index, bufsize, memAddressSafe(length), memAddress(name));
 }
예제 #11
0
 /** Array version of: {@link #stbi_info info} */
 public static int stbi_info(ByteBuffer filename, int[] x, int[] y, int[] comp) {
   if (CHECKS) {
     checkNT1(filename);
     checkBuffer(x, 1);
     checkBuffer(y, 1);
     checkBuffer(comp, 1);
   }
   return nstbi_info(memAddress(filename), x, y, comp);
 }
 /**
  * Returns information about several active uniform variables for the specified program object.
  *
  * @param program the program object to be queried
  * @param uniformCount the number of elements in the array of indices {@code uniformIndices} and
  *     the number of parameters written to {@code params} upon successful return
  * @param uniformIndices an array of {@code uniformCount} integers containing the indices of
  *     uniforms within {@code program}
  * @param pname the property of the each uniform in {@code uniformIndices} that should be written
  *     into the corresponding element of {@code params}
  * @param params an array of {@code uniformCount} integers which are to receive the value of
  *     {@code pname} for each uniform in {@code uniformIndices}
  */
 public static void glGetActiveUniformsiv(
     int program, int uniformCount, ByteBuffer uniformIndices, int pname, ByteBuffer params) {
   if (LWJGLUtil.CHECKS) {
     checkBuffer(uniformIndices, uniformCount << 2);
     checkBuffer(params, uniformCount << 2);
   }
   nglGetActiveUniformsiv(
       program, uniformCount, memAddress(uniformIndices), pname, memAddress(params));
 }
 /**
  * Retrieves the indices of a number of uniforms within a program object
  *
  * @param program the name of a program containing uniforms whose indices to query
  * @param uniformCount the number of uniforms whose indices to query
  * @param uniformNames an array of pointers to buffers containing the names of the queried
  *     uniforms
  * @param uniformIndices an array that will receive the indices of the uniforms
  */
 public static void glGetUniformIndices(
     int program, int uniformCount, ByteBuffer uniformNames, ByteBuffer uniformIndices) {
   if (LWJGLUtil.CHECKS) {
     checkBuffer(uniformNames, uniformCount << POINTER_SHIFT);
     checkBuffer(uniformIndices, uniformCount << 2);
   }
   nglGetUniformIndices(
       program, uniformCount, memAddress(uniformNames), memAddress(uniformIndices));
 }
 /**
  * Queries the name of an active uniform.
  *
  * @param program the program containing the active uniform index {@code uniformIndex}
  * @param uniformIndex the index of the active uniform whose name to query
  * @param bufSize the size of the buffer, in units of {@code GLchar}, of the buffer whose address
  *     is specified in {@code uniformName}
  * @param length the address of a variable that will receive the number of characters that were or
  *     would have been written to the buffer addressed by {@code uniformName}
  * @param uniformName the address of a buffer into which the GL will place the name of the active
  *     uniform at {@code uniformIndex} within {@code program}
  */
 public static void glGetActiveUniformName(
     int program, int uniformIndex, int bufSize, ByteBuffer length, ByteBuffer uniformName) {
   if (LWJGLUtil.CHECKS) {
     checkBuffer(uniformName, bufSize);
     if (length != null) checkBuffer(length, 1 << 2);
   }
   nglGetActiveUniformName(
       program, uniformIndex, bufSize, memAddressSafe(length), memAddress(uniformName));
 }
예제 #15
0
 /** Array version of: {@link #stbi_info_from_callbacks info_from_callbacks} */
 public static int stbi_info_from_callbacks(
     STBIIOCallbacks clbk, long user, int[] x, int[] y, int[] comp) {
   if (CHECKS) {
     checkBuffer(x, 1);
     checkBuffer(y, 1);
     checkBuffer(comp, 1);
     STBIIOCallbacks.validate(clbk.address());
   }
   return nstbi_info_from_callbacks(clbk.address(), user, x, y, comp);
 }
예제 #16
0
 /**
  * In-memory version of {@link #stbi_info info}.
  *
  * @param buffer the buffer from which to read the image data
  * @param x outputs the image width in pixels
  * @param y outputs the image height in pixels
  * @param comp outputs number of components in image
  */
 public static int stbi_info_from_memory(
     ByteBuffer buffer, IntBuffer x, IntBuffer y, IntBuffer comp) {
   if (CHECKS) {
     checkBuffer(x, 1);
     checkBuffer(y, 1);
     checkBuffer(comp, 1);
   }
   return nstbi_info_from_memory(
       memAddress(buffer), buffer.remaining(), memAddress(x), memAddress(y), memAddress(comp));
 }
예제 #17
0
 /**
  * Callback version of {@link #stbi_info info}.
  *
  * @param clbk an {@link STBIIOCallbacks} struct
  * @param user a pointer to user data
  * @param x outputs the image width in pixels
  * @param y outputs the image height in pixels
  * @param comp outputs number of components in image
  */
 public static int stbi_info_from_callbacks(
     STBIIOCallbacks clbk, long user, IntBuffer x, IntBuffer y, IntBuffer comp) {
   if (CHECKS) {
     checkBuffer(x, 1);
     checkBuffer(y, 1);
     checkBuffer(comp, 1);
     STBIIOCallbacks.validate(clbk.address());
   }
   return nstbi_info_from_callbacks(
       clbk.address(), user, memAddress(x), memAddress(y), memAddress(comp));
 }
예제 #18
0
 /**
  * Floating-point version of {@link #stbi_load load}.
  *
  * @param filename the file name
  * @param x outputs the image width in pixels
  * @param y outputs the image height in pixels
  * @param comp outputs number of components in image
  * @param req_comp 0 or 1..4 to force that many components per pixel. One of:<br>
  *     <table><tr><td>0</td><td>1</td><td>2</td><td>3</td><td>4</td></tr></table>
  */
 public static FloatBuffer stbi_loadf(
     ByteBuffer filename, IntBuffer x, IntBuffer y, IntBuffer comp, int req_comp) {
   if (CHECKS) {
     checkNT1(filename);
     checkBuffer(x, 1);
     checkBuffer(y, 1);
     checkBuffer(comp, 1);
   }
   long __result =
       nstbi_loadf(memAddress(filename), memAddress(x), memAddress(y), memAddress(comp), req_comp);
   return memFloatBuffer(
       __result, x.get(x.position()) * y.get(y.position()) * comp.get(comp.position()));
 }
예제 #19
0
 /** Alternative version of: {@link #glGetPerfMonitorCountersAMD GetPerfMonitorCountersAMD} */
 public static void glGetPerfMonitorCountersAMD(
     int group, IntBuffer numCounters, IntBuffer maxActiveCounters, IntBuffer counters) {
   if (LWJGLUtil.CHECKS) {
     checkBuffer(numCounters, 1);
     checkBuffer(maxActiveCounters, 1);
   }
   nglGetPerfMonitorCountersAMD(
       group,
       memAddress(numCounters),
       memAddress(maxActiveCounters),
       counters.remaining(),
       memAddress(counters));
 }
예제 #20
0
 /**
  * Floating-point version of {@link #stbi_load_from_callbacks load_from_callbacks}.
  *
  * @param clbk an {@link STBIIOCallbacks} struct
  * @param user a pointer to user data
  * @param x outputs the image width in pixels
  * @param y outputs the image height in pixels
  * @param comp outputs number of components in image
  * @param req_comp 0 or 1..4 to force that many components per pixel. One of:<br>
  *     <table><tr><td>0</td><td>1</td><td>2</td><td>3</td><td>4</td></tr></table>
  */
 public static FloatBuffer stbi_loadf_from_callbacks(
     STBIIOCallbacks clbk, long user, IntBuffer x, IntBuffer y, IntBuffer comp, int req_comp) {
   if (CHECKS) {
     checkBuffer(x, 1);
     checkBuffer(y, 1);
     checkBuffer(comp, 1);
     STBIIOCallbacks.validate(clbk.address());
   }
   long __result =
       nstbi_loadf_from_callbacks(
           clbk.address(), user, memAddress(x), memAddress(y), memAddress(comp), req_comp);
   return memFloatBuffer(
       __result, x.get(x.position()) * y.get(y.position()) * comp.get(comp.position()));
 }
예제 #21
0
 /** Array version of: {@link #stbi_info info} */
 public static int stbi_info(CharSequence filename, int[] x, int[] y, int[] comp) {
   if (CHECKS) {
     checkBuffer(x, 1);
     checkBuffer(y, 1);
     checkBuffer(comp, 1);
   }
   MemoryStack stack = stackGet();
   int stackPointer = stack.getPointer();
   try {
     ByteBuffer filenameEncoded = stack.ASCII(filename);
     return nstbi_info(memAddress(filenameEncoded), x, y, comp);
   } finally {
     stack.setPointer(stackPointer);
   }
 }
예제 #22
0
 public static void glGetPerfQueryIdByNameINTEL(ByteBuffer queryName, IntBuffer queryId) {
   if (CHECKS) {
     checkNT1(queryName);
     checkBuffer(queryId, 1);
   }
   nglGetPerfQueryIdByNameINTEL(memAddress(queryName), memAddress(queryId));
 }
예제 #23
0
 /** Array version of: {@link #glCreatePerfQueryINTEL CreatePerfQueryINTEL} */
 public static void glCreatePerfQueryINTEL(int queryId, int[] queryHandle) {
   long __functionAddress = GLES.getCapabilities().glCreatePerfQueryINTEL;
   if (CHECKS) {
     checkFunctionAddress(__functionAddress);
     checkBuffer(queryHandle, 1);
   }
   callPV(__functionAddress, queryId, queryHandle);
 }
예제 #24
0
 /** Array version of: {@link #glGetUniformuivEXT GetUniformuivEXT} */
 public static void glGetUniformuivEXT(int program, int location, int[] params) {
   long __functionAddress = GL.getCapabilities().glGetUniformuivEXT;
   if (CHECKS) {
     checkFunctionAddress(__functionAddress);
     checkBuffer(params, 1);
   }
   callPV(__functionAddress, program, location, params);
 }
예제 #25
0
 /** Array version of: {@link #glGetVertexAttribIuivEXT GetVertexAttribIuivEXT} */
 public static void glGetVertexAttribIuivEXT(int index, int pname, int[] params) {
   long __functionAddress = GL.getCapabilities().glGetVertexAttribIuivEXT;
   if (CHECKS) {
     checkFunctionAddress(__functionAddress);
     checkBuffer(params, 4);
   }
   callPV(__functionAddress, index, pname, params);
 }
예제 #26
0
 /** Array version of: {@link #glVertexAttribI2uivEXT VertexAttribI2uivEXT} */
 public static void glVertexAttribI2uivEXT(int index, int[] v) {
   long __functionAddress = GL.getCapabilities().glVertexAttribI2uivEXT;
   if (CHECKS) {
     checkFunctionAddress(__functionAddress);
     checkBuffer(v, 2);
   }
   callPV(__functionAddress, index, v);
 }
예제 #27
0
 /** Array version of: {@link #glGetNextPerfQueryIdINTEL GetNextPerfQueryIdINTEL} */
 public static void glGetNextPerfQueryIdINTEL(int queryId, int[] nextQueryId) {
   long __functionAddress = GLES.getCapabilities().glGetNextPerfQueryIdINTEL;
   if (CHECKS) {
     checkFunctionAddress(__functionAddress);
     checkBuffer(nextQueryId, 1);
   }
   callPV(__functionAddress, queryId, nextQueryId);
 }
예제 #28
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));
 }
예제 #29
0
 /** Array version of: {@link #glWindowPos3dvARB WindowPos3dvARB} */
 public static void glWindowPos3dvARB(double[] p) {
   long __functionAddress = GL.getCapabilities().glWindowPos3dvARB;
   if (CHECKS) {
     checkFunctionAddress(__functionAddress);
     checkBuffer(p, 3);
   }
   callPV(__functionAddress, p);
 }
예제 #30
0
 /**
  * Floating-point version of {@link #stbi_load_from_memory load_from_memory}.
  *
  * @param buffer the buffer from which to load the image data
  * @param x outputs the image width in pixels
  * @param y outputs the image height in pixels
  * @param comp outputs number of components in image
  * @param req_comp 0 or 1..4 to force that many components per pixel. One of:<br>
  *     <table><tr><td>0</td><td>1</td><td>2</td><td>3</td><td>4</td></tr></table>
  */
 public static FloatBuffer stbi_loadf_from_memory(
     ByteBuffer buffer, IntBuffer x, IntBuffer y, IntBuffer comp, int req_comp) {
   if (CHECKS) {
     checkBuffer(x, 1);
     checkBuffer(y, 1);
     checkBuffer(comp, 1);
   }
   long __result =
       nstbi_loadf_from_memory(
           memAddress(buffer),
           buffer.remaining(),
           memAddress(x),
           memAddress(y),
           memAddress(comp),
           req_comp);
   return memFloatBuffer(
       __result, x.get(x.position()) * y.get(y.position()) * comp.get(comp.position()));
 }