Beispiel #1
0
 /**
  * Checks if the specified file contains an HDR image.
  *
  * @param filename the file name
  * @return 1 if the image is HDR, 0 otherwise
  */
 public static int stbi_is_hdr(CharSequence filename) {
   MemoryStack stack = stackGet();
   int stackPointer = stack.getPointer();
   try {
     ByteBuffer filenameEncoded = stack.ASCII(filename);
     return nstbi_is_hdr(memAddress(filenameEncoded));
   } finally {
     stack.setPointer(stackPointer);
   }
 }
Beispiel #2
0
 public static int glGetFragDataLocationEXT(int program, CharSequence name) {
   MemoryStack stack = stackGet();
   int stackPointer = stack.getPointer();
   try {
     ByteBuffer nameEncoded = stack.ASCII(name);
     return nglGetFragDataLocationEXT(program, memAddress(nameEncoded));
   } finally {
     stack.setPointer(stackPointer);
   }
 }
Beispiel #3
0
 public static void glBindFragDataLocationEXT(int program, int color, CharSequence name) {
   MemoryStack stack = stackGet();
   int stackPointer = stack.getPointer();
   try {
     ByteBuffer nameEncoded = stack.ASCII(name);
     nglBindFragDataLocationEXT(program, color, memAddress(nameEncoded));
   } finally {
     stack.setPointer(stackPointer);
   }
 }
 public static void glGetPerfQueryIdByNameINTEL(CharSequence queryName, IntBuffer queryId) {
   if (CHECKS) checkBuffer(queryId, 1);
   MemoryStack stack = stackGet();
   int stackPointer = stack.getPointer();
   try {
     ByteBuffer queryNameEncoded = stack.ASCII(queryName);
     nglGetPerfQueryIdByNameINTEL(memAddress(queryNameEncoded), memAddress(queryId));
   } finally {
     stack.setPointer(stackPointer);
   }
 }
 public static int glGetPerfQueryIdByNameINTEL(CharSequence queryName) {
   MemoryStack stack = stackGet();
   int stackPointer = stack.getPointer();
   try {
     ByteBuffer queryNameEncoded = stack.ASCII(queryName);
     IntBuffer queryId = stack.callocInt(1);
     nglGetPerfQueryIdByNameINTEL(memAddress(queryNameEncoded), memAddress(queryId));
     return queryId.get(0);
   } finally {
     stack.setPointer(stackPointer);
   }
 }
Beispiel #6
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);
   }
 }
 /** Array version of: {@link #glGetPerfQueryIdByNameINTEL GetPerfQueryIdByNameINTEL} */
 public static void glGetPerfQueryIdByNameINTEL(CharSequence queryName, int[] queryId) {
   long __functionAddress = GLES.getCapabilities().glGetPerfQueryIdByNameINTEL;
   if (CHECKS) {
     checkFunctionAddress(__functionAddress);
     checkBuffer(queryId, 1);
   }
   MemoryStack stack = stackGet();
   int stackPointer = stack.getPointer();
   try {
     ByteBuffer queryNameEncoded = stack.ASCII(queryName);
     callPPV(__functionAddress, memAddress(queryNameEncoded), queryId);
   } finally {
     stack.setPointer(stackPointer);
   }
 }
Beispiel #8
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(
     CharSequence filename, IntBuffer x, IntBuffer y, IntBuffer comp, int req_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);
     long __result =
         nstbi_loadf(
             memAddress(filenameEncoded),
             memAddress(x),
             memAddress(y),
             memAddress(comp),
             req_comp);
     return memFloatBuffer(
         __result, x.get(x.position()) * y.get(y.position()) * comp.get(comp.position()));
   } finally {
     stack.setPointer(stackPointer);
   }
 }