2005-02-15 12:05:36 +01:00
/* MACHINE GENERATED FILE, DO NOT EDIT */
2004-03-29 18:55:27 +02:00
package org.lwjgl.opengl ;
2005-05-04 22:59:44 +02:00
import java.nio.Buffer ;
import java.nio.ByteBuffer ;
import java.nio.FloatBuffer ;
import java.nio.IntBuffer ;
import java.nio.ShortBuffer ;
2005-02-15 12:05:36 +01:00
import org.lwjgl.BufferChecks ;
2004-07-04 15:14:06 +02:00
2005-02-15 12:05:36 +01:00
public class ARBBufferObject {
public static final int GL_BUFFER_MAP_POINTER_ARB = 0x88bd ;
public static final int GL_BUFFER_MAPPED_ARB = 0x88bc ;
public static final int GL_BUFFER_ACCESS_ARB = 0x88bb ;
2004-11-25 23:20:45 +01:00
public static final int GL_BUFFER_USAGE_ARB = 0x8765 ;
2005-02-15 12:05:36 +01:00
public static final int GL_BUFFER_SIZE_ARB = 0x8764 ;
public static final int GL_READ_WRITE_ARB = 0x88ba ;
public static final int GL_WRITE_ONLY_ARB = 0x88b9 ;
public static final int GL_READ_ONLY_ARB = 0x88b8 ;
public static final int GL_DYNAMIC_COPY_ARB = 0x88ea ;
public static final int GL_DYNAMIC_READ_ARB = 0x88e9 ;
public static final int GL_DYNAMIC_DRAW_ARB = 0x88e8 ;
public static final int GL_STATIC_COPY_ARB = 0x88e6 ;
public static final int GL_STATIC_READ_ARB = 0x88e5 ;
public static final int GL_STATIC_DRAW_ARB = 0x88e4 ;
public static final int GL_STREAM_COPY_ARB = 0x88e2 ;
public static final int GL_STREAM_READ_ARB = 0x88e1 ;
public static final int GL_STREAM_DRAW_ARB = 0x88e0 ;
2004-03-29 18:55:27 +02:00
2004-07-03 23:12:33 +02:00
2005-02-15 12:05:36 +01:00
public static java . nio . ByteBuffer glGetBufferPointerARB ( int target , int pname , int result_size ) {
2005-02-16 17:04:29 +01:00
long function_pointer = GLContext . getCapabilities ( ) . ARB_buffer_object_glGetBufferPointervARB_pointer ;
BufferChecks . checkFunctionAddress ( function_pointer ) ;
java . nio . ByteBuffer __result = nglGetBufferPointervARB ( target , pname , result_size , function_pointer ) ;
2005-02-15 12:05:36 +01:00
return __result ;
2004-03-29 18:55:27 +02:00
}
2005-02-16 17:04:29 +01:00
private static native java . nio . ByteBuffer nglGetBufferPointervARB ( int target , int pname , int result_size , long function_pointer ) ;
2004-11-25 23:20:45 +01:00
2005-02-15 12:05:36 +01:00
public static void glGetBufferParameterARB ( int target , int pname , IntBuffer params ) {
2005-02-16 17:04:29 +01:00
long function_pointer = GLContext . getCapabilities ( ) . ARB_buffer_object_glGetBufferParameterivARB_pointer ;
BufferChecks . checkFunctionAddress ( function_pointer ) ;
2005-03-21 09:27:45 +01:00
BufferChecks . checkBuffer ( params , 4 ) ;
2005-02-16 17:04:29 +01:00
nglGetBufferParameterivARB ( target , pname , params , params . position ( ) , function_pointer ) ;
2004-03-29 18:55:27 +02:00
}
2005-02-16 17:04:29 +01:00
private static native void nglGetBufferParameterivARB ( int target , int pname , IntBuffer params , int params_position , long function_pointer ) ;
2004-11-25 23:20:45 +01:00
2005-02-16 17:04:29 +01:00
public static boolean glUnmapBufferARB ( int target ) {
long function_pointer = GLContext . getCapabilities ( ) . ARB_buffer_object_glUnmapBufferARB_pointer ;
BufferChecks . checkFunctionAddress ( function_pointer ) ;
boolean __result = nglUnmapBufferARB ( target , function_pointer ) ;
return __result ;
}
private static native boolean nglUnmapBufferARB ( int target , long function_pointer ) ;
2004-11-25 23:20:45 +01:00
2005-02-15 12:05:36 +01:00
/ * *
* glMapBufferARB maps a gl vertex buffer buffer to a ByteBuffer . The oldBuffer argument can be null ,
* in which case a new ByteBuffer will be created , pointing to the returned memory . If oldBuffer is non - null ,
* it will be returned if it points to the same mapped memory , otherwise a new ByteBuffer is created . That
* way , an application will normally use glMapBufferARB like this :
* < p / >
* ByteBuffer mapped_buffer ; mapped_buffer = glMapBufferARB ( . . . , . . . , . . . , null ) ; . . . // Another map on the same buffer mapped_buffer = glMapBufferARB(..., ..., ..., mapped_buffer);
2005-02-16 13:58:40 +01:00
* @param result_size The size of the buffer area .
* @param old_buffer A ByteBuffer . If this argument points to the same address as the new mapping , it will be returned and no new buffer will be created . In that case , size is ignored .
2005-02-15 12:05:36 +01:00
* @return A ByteBuffer representing the mapped buffer memory .
* /
public static java . nio . ByteBuffer glMapBufferARB ( int target , int access , int result_size , java . nio . ByteBuffer old_buffer ) {
2005-02-16 17:04:29 +01:00
long function_pointer = GLContext . getCapabilities ( ) . ARB_buffer_object_glMapBufferARB_pointer ;
BufferChecks . checkFunctionAddress ( function_pointer ) ;
2005-03-21 09:27:45 +01:00
if ( old_buffer ! = null )
BufferChecks . checkDirect ( old_buffer ) ;
2005-02-16 17:04:29 +01:00
java . nio . ByteBuffer __result = nglMapBufferARB ( target , access , result_size , old_buffer , function_pointer ) ;
2005-02-15 12:05:36 +01:00
return __result ;
2004-03-29 18:55:27 +02:00
}
2005-02-16 17:04:29 +01:00
private static native java . nio . ByteBuffer nglMapBufferARB ( int target , int access , int result_size , java . nio . ByteBuffer old_buffer , long function_pointer ) ;
2004-11-25 23:20:45 +01:00
2005-02-16 22:46:03 +01:00
public static void glGetBufferSubDataARB ( int target , int offset , ByteBuffer data ) {
2005-02-16 17:04:29 +01:00
long function_pointer = GLContext . getCapabilities ( ) . ARB_buffer_object_glGetBufferSubDataARB_pointer ;
BufferChecks . checkFunctionAddress ( function_pointer ) ;
2005-03-21 09:27:45 +01:00
BufferChecks . checkDirect ( data ) ;
2005-02-16 22:46:03 +01:00
nglGetBufferSubDataARB ( target , offset , ( data . remaining ( ) ) , data , data . position ( ) , function_pointer ) ;
2005-01-30 00:13:00 +01:00
}
2005-02-16 22:46:03 +01:00
public static void glGetBufferSubDataARB ( int target , int offset , FloatBuffer data ) {
2005-02-16 17:04:29 +01:00
long function_pointer = GLContext . getCapabilities ( ) . ARB_buffer_object_glGetBufferSubDataARB_pointer ;
BufferChecks . checkFunctionAddress ( function_pointer ) ;
2005-03-21 09:27:45 +01:00
BufferChecks . checkDirect ( data ) ;
2005-02-16 17:04:29 +01:00
nglGetBufferSubDataARB ( target , offset , ( data . remaining ( ) < < 2 ) , data , data . position ( ) < < 2 , function_pointer ) ;
2004-03-29 18:55:27 +02:00
}
2005-02-16 22:46:03 +01:00
public static void glGetBufferSubDataARB ( int target , int offset , IntBuffer data ) {
2005-02-16 17:04:29 +01:00
long function_pointer = GLContext . getCapabilities ( ) . ARB_buffer_object_glGetBufferSubDataARB_pointer ;
BufferChecks . checkFunctionAddress ( function_pointer ) ;
2005-03-21 09:27:45 +01:00
BufferChecks . checkDirect ( data ) ;
2005-02-16 21:25:23 +01:00
nglGetBufferSubDataARB ( target , offset , ( data . remaining ( ) < < 2 ) , data , data . position ( ) < < 2 , function_pointer ) ;
2004-03-29 18:55:27 +02:00
}
2005-02-16 22:46:03 +01:00
public static void glGetBufferSubDataARB ( int target , int offset , ShortBuffer data ) {
2005-02-16 17:04:29 +01:00
long function_pointer = GLContext . getCapabilities ( ) . ARB_buffer_object_glGetBufferSubDataARB_pointer ;
BufferChecks . checkFunctionAddress ( function_pointer ) ;
2005-03-21 09:27:45 +01:00
BufferChecks . checkDirect ( data ) ;
2005-02-16 22:46:03 +01:00
nglGetBufferSubDataARB ( target , offset , ( data . remaining ( ) < < 1 ) , data , data . position ( ) < < 1 , function_pointer ) ;
2004-03-29 18:55:27 +02:00
}
2005-02-16 17:04:29 +01:00
private static native void nglGetBufferSubDataARB ( int target , int offset , int size , Buffer data , int data_position , long function_pointer ) ;
2004-11-25 23:20:45 +01:00
2005-02-16 22:46:03 +01:00
public static void glBufferSubDataARB ( int target , int offset , ByteBuffer data ) {
2005-02-16 17:04:29 +01:00
long function_pointer = GLContext . getCapabilities ( ) . ARB_buffer_object_glBufferSubDataARB_pointer ;
BufferChecks . checkFunctionAddress ( function_pointer ) ;
2005-03-21 09:27:45 +01:00
BufferChecks . checkDirect ( data ) ;
2005-02-16 22:46:03 +01:00
nglBufferSubDataARB ( target , offset , ( data . remaining ( ) ) , data , data . position ( ) , function_pointer ) ;
2005-02-15 12:05:36 +01:00
}
2005-02-16 22:46:03 +01:00
public static void glBufferSubDataARB ( int target , int offset , FloatBuffer data ) {
2005-02-16 17:04:29 +01:00
long function_pointer = GLContext . getCapabilities ( ) . ARB_buffer_object_glBufferSubDataARB_pointer ;
BufferChecks . checkFunctionAddress ( function_pointer ) ;
2005-03-21 09:27:45 +01:00
BufferChecks . checkDirect ( data ) ;
2005-02-16 17:04:29 +01:00
nglBufferSubDataARB ( target , offset , ( data . remaining ( ) < < 2 ) , data , data . position ( ) < < 2 , function_pointer ) ;
2004-03-29 18:55:27 +02:00
}
2005-02-16 22:46:03 +01:00
public static void glBufferSubDataARB ( int target , int offset , IntBuffer data ) {
2005-02-16 17:04:29 +01:00
long function_pointer = GLContext . getCapabilities ( ) . ARB_buffer_object_glBufferSubDataARB_pointer ;
BufferChecks . checkFunctionAddress ( function_pointer ) ;
2005-03-21 09:27:45 +01:00
BufferChecks . checkDirect ( data ) ;
2005-02-16 21:25:23 +01:00
nglBufferSubDataARB ( target , offset , ( data . remaining ( ) < < 2 ) , data , data . position ( ) < < 2 , function_pointer ) ;
2004-03-29 18:55:27 +02:00
}
2005-02-16 22:46:03 +01:00
public static void glBufferSubDataARB ( int target , int offset , ShortBuffer data ) {
2005-02-16 17:04:29 +01:00
long function_pointer = GLContext . getCapabilities ( ) . ARB_buffer_object_glBufferSubDataARB_pointer ;
BufferChecks . checkFunctionAddress ( function_pointer ) ;
2005-03-21 09:27:45 +01:00
BufferChecks . checkDirect ( data ) ;
2005-02-16 22:46:03 +01:00
nglBufferSubDataARB ( target , offset , ( data . remaining ( ) < < 1 ) , data , data . position ( ) < < 1 , function_pointer ) ;
2004-03-29 18:55:27 +02:00
}
2005-02-16 17:04:29 +01:00
private static native void nglBufferSubDataARB ( int target , int offset , int size , Buffer data , int data_position , long function_pointer ) ;
2004-11-25 23:20:45 +01:00
2005-02-15 12:05:36 +01:00
public static void glBufferDataARB ( int target , int size , int usage ) {
2005-02-16 17:04:29 +01:00
long function_pointer = GLContext . getCapabilities ( ) . ARB_buffer_object_glBufferDataARB_pointer ;
BufferChecks . checkFunctionAddress ( function_pointer ) ;
nglBufferDataARB ( target , size , null , 0 , usage , function_pointer ) ;
2005-02-15 12:05:36 +01:00
}
2005-02-16 22:46:03 +01:00
public static void glBufferDataARB ( int target , ByteBuffer data , int usage ) {
2005-02-16 17:04:29 +01:00
long function_pointer = GLContext . getCapabilities ( ) . ARB_buffer_object_glBufferDataARB_pointer ;
BufferChecks . checkFunctionAddress ( function_pointer ) ;
2005-03-21 09:27:45 +01:00
BufferChecks . checkDirect ( data ) ;
2005-02-16 22:46:03 +01:00
nglBufferDataARB ( target , ( data . remaining ( ) ) , data , data . position ( ) , usage , function_pointer ) ;
2004-03-29 18:55:27 +02:00
}
2005-02-16 22:46:03 +01:00
public static void glBufferDataARB ( int target , FloatBuffer data , int usage ) {
2005-02-16 17:04:29 +01:00
long function_pointer = GLContext . getCapabilities ( ) . ARB_buffer_object_glBufferDataARB_pointer ;
BufferChecks . checkFunctionAddress ( function_pointer ) ;
2005-03-21 09:27:45 +01:00
BufferChecks . checkDirect ( data ) ;
2005-02-16 17:04:29 +01:00
nglBufferDataARB ( target , ( data . remaining ( ) < < 2 ) , data , data . position ( ) < < 2 , usage , function_pointer ) ;
2004-03-29 18:55:27 +02:00
}
2005-02-16 22:46:03 +01:00
public static void glBufferDataARB ( int target , IntBuffer data , int usage ) {
2005-02-16 17:04:29 +01:00
long function_pointer = GLContext . getCapabilities ( ) . ARB_buffer_object_glBufferDataARB_pointer ;
BufferChecks . checkFunctionAddress ( function_pointer ) ;
2005-03-21 09:27:45 +01:00
BufferChecks . checkDirect ( data ) ;
2005-02-16 21:25:23 +01:00
nglBufferDataARB ( target , ( data . remaining ( ) < < 2 ) , data , data . position ( ) < < 2 , usage , function_pointer ) ;
2004-03-29 18:55:27 +02:00
}
2005-02-16 22:46:03 +01:00
public static void glBufferDataARB ( int target , ShortBuffer data , int usage ) {
2005-02-16 17:04:29 +01:00
long function_pointer = GLContext . getCapabilities ( ) . ARB_buffer_object_glBufferDataARB_pointer ;
BufferChecks . checkFunctionAddress ( function_pointer ) ;
2005-03-21 09:27:45 +01:00
BufferChecks . checkDirect ( data ) ;
2005-02-16 22:46:03 +01:00
nglBufferDataARB ( target , ( data . remaining ( ) < < 1 ) , data , data . position ( ) < < 1 , usage , function_pointer ) ;
2004-03-29 18:55:27 +02:00
}
2005-02-16 17:04:29 +01:00
private static native void nglBufferDataARB ( int target , int size , Buffer data , int data_position , int usage , long function_pointer ) ;
2004-11-25 23:20:45 +01:00
2005-02-16 17:04:29 +01:00
public static boolean glIsBufferARB ( int buffer ) {
long function_pointer = GLContext . getCapabilities ( ) . ARB_buffer_object_glIsBufferARB_pointer ;
BufferChecks . checkFunctionAddress ( function_pointer ) ;
boolean __result = nglIsBufferARB ( buffer , function_pointer ) ;
return __result ;
}
private static native boolean nglIsBufferARB ( int buffer , long function_pointer ) ;
2004-11-25 23:20:45 +01:00
2005-02-15 12:05:36 +01:00
public static void glGenBuffersARB ( IntBuffer buffers ) {
2005-02-16 17:04:29 +01:00
long function_pointer = GLContext . getCapabilities ( ) . ARB_buffer_object_glGenBuffersARB_pointer ;
BufferChecks . checkFunctionAddress ( function_pointer ) ;
2005-03-21 09:27:45 +01:00
BufferChecks . checkDirect ( buffers ) ;
2005-02-16 17:04:29 +01:00
nglGenBuffersARB ( ( buffers . remaining ( ) ) , buffers , buffers . position ( ) , function_pointer ) ;
2004-03-29 18:55:27 +02:00
}
2005-02-16 17:04:29 +01:00
private static native void nglGenBuffersARB ( int n , IntBuffer buffers , int buffers_position , long function_pointer ) ;
2004-11-25 23:20:45 +01:00
2005-02-15 12:05:36 +01:00
public static void glDeleteBuffersARB ( IntBuffer buffers ) {
2005-03-21 09:27:45 +01:00
StateTracker . deleteBuffers ( buffers ) ;
2005-02-16 17:04:29 +01:00
long function_pointer = GLContext . getCapabilities ( ) . ARB_buffer_object_glDeleteBuffersARB_pointer ;
BufferChecks . checkFunctionAddress ( function_pointer ) ;
2005-03-21 09:27:45 +01:00
BufferChecks . checkDirect ( buffers ) ;
2005-02-16 17:04:29 +01:00
nglDeleteBuffersARB ( ( buffers . remaining ( ) ) , buffers , buffers . position ( ) , function_pointer ) ;
2005-02-15 12:05:36 +01:00
}
2005-02-16 17:04:29 +01:00
private static native void nglDeleteBuffersARB ( int n , IntBuffer buffers , int buffers_position , long function_pointer ) ;
2004-11-25 23:20:45 +01:00
2005-02-15 12:05:36 +01:00
public static void glBindBufferARB ( int target , int buffer ) {
2005-03-21 09:27:45 +01:00
StateTracker . bindBuffer ( target , buffer ) ;
2005-02-16 17:04:29 +01:00
long function_pointer = GLContext . getCapabilities ( ) . ARB_buffer_object_glBindBufferARB_pointer ;
BufferChecks . checkFunctionAddress ( function_pointer ) ;
nglBindBufferARB ( target , buffer , function_pointer ) ;
2005-02-15 12:05:36 +01:00
}
2005-02-16 17:04:29 +01:00
private static native void nglBindBufferARB ( int target , int buffer , long function_pointer ) ;
2004-03-29 18:55:27 +02:00
}