コード例 #1
0
 /** Explicit size alternative version of: {@link #glMapBuffer MapBuffer} */
 public static ByteBuffer glMapBuffer(int target, int access, long length, ByteBuffer old_buffer) {
   long __result = nglMapBuffer(target, access);
   return old_buffer != null
           && __result == memAddress0(old_buffer)
           && old_buffer.capacity() == length
       ? old_buffer
       : memByteBuffer(__result, (int) length);
 }
コード例 #2
0
 /** Alternative version of: {@link #glMapBuffer MapBuffer} */
 public static ByteBuffer glMapBuffer(int target, int access, ByteBuffer old_buffer) {
   long __result = nglMapBuffer(target, access);
   int length = glGetBufferParameteri(target, GL_BUFFER_SIZE);
   return old_buffer != null
           && __result == memAddress0(old_buffer)
           && old_buffer.capacity() == length
       ? old_buffer
       : memByteBuffer(__result, length);
 }
コード例 #3
0
 /** Alternative version of: {@link #glGetActiveUniformBlockName GetActiveUniformBlockName} */
 public static void glGetActiveUniformBlockName(
     int program, int uniformBlockIndex, IntBuffer length, ByteBuffer uniformBlockName) {
   if (LWJGLUtil.CHECKS) if (length != null) checkBuffer(length, 1);
   nglGetActiveUniformBlockName(
       program,
       uniformBlockIndex,
       uniformBlockName.remaining(),
       memAddressSafe(length),
       memAddress(uniformBlockName));
 }
コード例 #4
0
 /** ByteBuffer version of: {@link #glGetBufferSubData GetBufferSubData} */
 public static void glGetBufferSubData(int target, long offset, ByteBuffer data) {
   nglGetBufferSubData(target, offset, data.remaining(), memAddress(data));
 }
コード例 #5
0
 /** ByteBuffer version of: {@link #glBufferData BufferData} */
 public static void glBufferData(int target, ByteBuffer data, int usage) {
   nglBufferData(target, data.remaining(), memAddress(data), usage);
 }