Esempio n. 1
0
  static {
    IntBuffer offsets = memAllocInt(2);

    SIZEOF = offsets(memAddress(offsets));

    X = offsets.get(0);
    Y = offsets.get(1);

    memFree(offsets);
  }
Esempio n. 2
0
 /**
  * Unsigned version of {@link #glGetVertexAttribIivEXT GetVertexAttribIivEXT}.
  *
  * @param index the index of the pure integer generic vertex attribute to be modified
  * @param pname the symbolic name of the vertex attribute parameter to be queried
  */
 public static int glGetVertexAttribIuiEXT(int index, int pname) {
   MemoryStack stack = stackGet();
   int stackPointer = stack.getPointer();
   try {
     IntBuffer params = stack.callocInt(1);
     nglGetVertexAttribIuivEXT(index, pname, memAddress(params));
     return params.get(0);
   } finally {
     stack.setPointer(stackPointer);
   }
 }
 public static int glGetNextPerfQueryIdINTEL(int queryId) {
   MemoryStack stack = stackGet();
   int stackPointer = stack.getPointer();
   try {
     IntBuffer nextQueryId = stack.callocInt(1);
     nglGetNextPerfQueryIdINTEL(queryId, memAddress(nextQueryId));
     return nextQueryId.get(0);
   } finally {
     stack.setPointer(stackPointer);
   }
 }
 public static int glGetFirstPerfQueryIdINTEL() {
   MemoryStack stack = stackGet();
   int stackPointer = stack.getPointer();
   try {
     IntBuffer queryId = stack.callocInt(1);
     nglGetFirstPerfQueryIdINTEL(memAddress(queryId));
     return queryId.get(0);
   } finally {
     stack.setPointer(stackPointer);
   }
 }
 public static int glCreatePerfQueryINTEL(int queryId) {
   MemoryStack stack = stackGet();
   int stackPointer = stack.getPointer();
   try {
     IntBuffer queryHandle = stack.callocInt(1);
     nglCreatePerfQueryINTEL(queryId, memAddress(queryHandle));
     return queryHandle.get(0);
   } finally {
     stack.setPointer(stackPointer);
   }
 }
Esempio n. 6
0
 public static int glGetUniformuiEXT(int program, int location) {
   MemoryStack stack = stackGet();
   int stackPointer = stack.getPointer();
   try {
     IntBuffer params = stack.callocInt(1);
     nglGetUniformuivEXT(program, location, memAddress(params));
     return params.get(0);
   } 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);
   }
 }
Esempio n. 8
0
 /**
  * ZLIB client - used by PNG, available for other purposes
  *
  * @param buffer
  */
 public static ByteBuffer stbi_zlib_decode_malloc(ByteBuffer buffer) {
   MemoryStack stack = stackGet();
   int stackPointer = stack.getPointer();
   try {
     IntBuffer outlen = stack.callocInt(1);
     long __result =
         nstbi_zlib_decode_malloc(memAddress(buffer), buffer.remaining(), memAddress(outlen));
     return memByteBuffer(__result, outlen.get(0));
   } finally {
     stack.setPointer(stackPointer);
   }
 }
Esempio n. 9
0
 /**
  * ZLIB client - used by PNG, available for other purposes
  *
  * @param buffer
  * @param initial_size
  * @param parse_header
  */
 public static ByteBuffer stbi_zlib_decode_malloc_guesssize_headerflag(
     ByteBuffer buffer, int initial_size, int parse_header) {
   MemoryStack stack = stackGet();
   int stackPointer = stack.getPointer();
   try {
     IntBuffer outlen = stack.callocInt(1);
     long __result =
         nstbi_zlib_decode_malloc_guesssize_headerflag(
             memAddress(buffer),
             buffer.remaining(),
             initial_size,
             memAddress(outlen),
             parse_header);
     return memByteBuffer(__result, outlen.get(0));
   } finally {
     stack.setPointer(stackPointer);
   }
 }
 /** 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));
 }
  static {
    IntBuffer offsets = BufferUtils.createIntBuffer(6);

    SIZEOF = offsets(memAddress(offsets));

    WIDTH = offsets.get(0);
    HEIGHT = offsets.get(1);
    REDBITS = offsets.get(2);
    GREENBITS = offsets.get(3);
    BLUEBITS = offsets.get(4);
    REFRESHRATE = offsets.get(5);
  }
Esempio n. 12
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()));
 }
Esempio n. 13
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()));
 }
Esempio n. 14
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()));
 }
Esempio n. 15
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);
   }
 }
Esempio n. 16
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));
 }
 /** Alternative version of: {@link #eglSwapBuffersWithDamageEXT SwapBuffersWithDamageEXT} */
 public static boolean eglSwapBuffersWithDamageEXT(long dpy, long surface, IntBuffer rects) {
   return neglSwapBuffersWithDamageEXT(
       dpy, surface, memAddressSafe(rects), rects == null ? 0 : rects.remaining());
 }
 /**
  * Alternative version of: {@link #glGetPerfMonitorCounterDataAMD GetPerfMonitorCounterDataAMD}
  */
 public static void glGetPerfMonitorCounterDataAMD(
     int monitor, int pname, IntBuffer data, IntBuffer bytesWritten) {
   if (LWJGLUtil.CHECKS) if (bytesWritten != null) checkBuffer(bytesWritten, 1);
   nglGetPerfMonitorCounterDataAMD(
       monitor, pname, data.remaining(), memAddress(data), memAddressSafe(bytesWritten));
 }
 /** Alternative version of: {@link #glGetActiveUniformsiv GetActiveUniformsiv} */
 public static void glGetActiveUniformsiv(
     int program, IntBuffer uniformIndices, int pname, IntBuffer params) {
   if (LWJGLUtil.CHECKS) checkBuffer(params, uniformIndices.remaining());
   nglGetActiveUniformsiv(
       program, uniformIndices.remaining(), memAddress(uniformIndices), pname, memAddress(params));
 }
Esempio n. 20
0
 public static void glUniform4uivEXT(int location, IntBuffer value) {
   nglUniform4uivEXT(location, value.remaining() >> 2, memAddress(value));
 }
 /**
  * Alternative version of: {@link #glSelectPerfMonitorCountersAMD SelectPerfMonitorCountersAMD}
  */
 public static void glSelectPerfMonitorCountersAMD(
     int monitor, boolean enable, int group, IntBuffer counterList) {
   nglSelectPerfMonitorCountersAMD(
       monitor, enable, group, counterList.remaining(), memAddress(counterList));
 }
Esempio n. 22
0
 /** IntBuffer version of: {@link #glGetBufferSubData GetBufferSubData} */
 public static void glGetBufferSubData(int target, long offset, IntBuffer data) {
   nglGetBufferSubData(target, offset, data.remaining() << 2, memAddress(data));
 }
 /** Alternative version of: {@link #glScissorArrayv ScissorArrayv} */
 public static void glScissorArrayv(int first, IntBuffer v) {
   nglScissorArrayv(first, v.remaining() >> 2, memAddress(v));
 }
 /** GL_UNSIGNED_INT version of: {@link #wglGetGPUInfoAMD GetGPUInfoAMD} */
 public static int wglGetGPUInfoAMD(int id, int property, IntBuffer data) {
   return nwglGetGPUInfoAMD(
       id, property, GL11.GL_UNSIGNED_INT, data.remaining(), memAddress(data));
 }
 /** Alternative version of: {@link #wglGetGPUIDsAMD GetGPUIDsAMD} */
 public static int wglGetGPUIDsAMD(IntBuffer ids) {
   return nwglGetGPUIDsAMD(ids == null ? 0 : ids.remaining(), memAddressSafe(ids));
 }
Esempio n. 26
0
 /** Alternative version of: {@link #glGenBuffers GenBuffers} */
 public static void glGenBuffers(IntBuffer buffers) {
   nglGenBuffers(buffers.remaining(), memAddress(buffers));
 }
Esempio n. 27
0
 /** IntBuffer version of: {@link #glBufferData BufferData} */
 public static void glBufferData(int target, IntBuffer data, int usage) {
   nglBufferData(target, data.remaining() << 2, memAddress(data), usage);
 }
 /**
  * Alternative version of: {@link #glUniformSubroutinesui(int, int, java.nio.ByteBuffer)
  * UniformSubroutinesui}
  */
 public static void glUniformSubroutinesu(int shadertype, IntBuffer indices) {
   nglUniformSubroutinesuiv(shadertype, indices.remaining(), memAddress(indices));
 }
Esempio n. 29
0
 /** Alternative version of: {@link #glDeleteQueries DeleteQueries} */
 public static void glDeleteQueries(IntBuffer ids) {
   nglDeleteQueries(ids.remaining(), memAddress(ids));
 }
 /** Alternative version of: {@link #glDeletePerfMonitorsAMD DeletePerfMonitorsAMD} */
 public static void glDeletePerfMonitorsAMD(IntBuffer monitors) {
   nglDeletePerfMonitorsAMD(monitors.remaining(), memAddress(monitors));
 }