Implemented PBO support
This commit is contained in:
parent
2f536fef59
commit
0c6521397e
|
@ -61,7 +61,16 @@ static void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTex
|
||||||
{
|
{
|
||||||
GLvoid *pData_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pData) + pData_offset);
|
GLvoid *pData_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pData) + pData_offset);
|
||||||
glCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData_ptr);
|
glCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData_ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org.lwjgl.opengl.ARBTextureCompression
|
||||||
|
* Method: nglCompressedTexImage1DARBBO
|
||||||
|
*/
|
||||||
|
static void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage1DARBBO
|
||||||
|
(JNIEnv * env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint border, jint imageSize, jint buffer_offset)
|
||||||
|
{
|
||||||
|
glCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, offsetToPointer(buffer_offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -73,7 +82,16 @@ static void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTex
|
||||||
{
|
{
|
||||||
GLvoid *pData_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pData) + pData_offset);
|
GLvoid *pData_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pData) + pData_offset);
|
||||||
glCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData_ptr);
|
glCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData_ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org.lwjgl.opengl.ARBTextureCompression
|
||||||
|
* Method: nglCompressedTexImage2DARBBO
|
||||||
|
*/
|
||||||
|
static void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage2DARBBO
|
||||||
|
(JNIEnv * env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jint buffer_offset)
|
||||||
|
{
|
||||||
|
glCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, offsetToPointer(buffer_offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -85,7 +103,16 @@ static void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTex
|
||||||
{
|
{
|
||||||
GLvoid *pData_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pData) + pData_offset);
|
GLvoid *pData_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pData) + pData_offset);
|
||||||
glCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData_ptr);
|
glCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData_ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org.lwjgl.opengl.ARBTextureCompression
|
||||||
|
* Method: nglCompressedTexImage3DARBBO
|
||||||
|
*/
|
||||||
|
static void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage3DARBBO
|
||||||
|
(JNIEnv * env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jint buffer_offset)
|
||||||
|
{
|
||||||
|
glCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, offsetToPointer(buffer_offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -97,7 +124,16 @@ static void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTex
|
||||||
{
|
{
|
||||||
GLvoid *pData_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pData) + pData_offset);
|
GLvoid *pData_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pData) + pData_offset);
|
||||||
glCompressedTexSubImage1DARB(target, level, xoffset, width, border, imageSize, pData_ptr);
|
glCompressedTexSubImage1DARB(target, level, xoffset, width, border, imageSize, pData_ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org.lwjgl.opengl.ARBTextureCompression
|
||||||
|
* Method: nglCompressedTexSubImage1DARBBO
|
||||||
|
*/
|
||||||
|
static void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage1DARBBO
|
||||||
|
(JNIEnv * env, jclass clazz, jint target, jint level, jint xoffset, jint width, jint border, jint imageSize, jint buffer_offset)
|
||||||
|
{
|
||||||
|
glCompressedTexSubImage1DARB(target, level, xoffset, width, border, imageSize, offsetToPointer(buffer_offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -109,7 +145,16 @@ static void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTex
|
||||||
{
|
{
|
||||||
GLvoid *pData_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pData) + pData_offset);
|
GLvoid *pData_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pData) + pData_offset);
|
||||||
glCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, border, imageSize, pData_ptr);
|
glCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, border, imageSize, pData_ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org.lwjgl.opengl.ARBTextureCompression
|
||||||
|
* Method: nglCompressedTexSubImage2DARBBO
|
||||||
|
*/
|
||||||
|
static void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage2DARBBO
|
||||||
|
(JNIEnv * env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint border, jint imageSize, jint buffer_offset)
|
||||||
|
{
|
||||||
|
glCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, border, imageSize, offsetToPointer(buffer_offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -121,7 +166,16 @@ static void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTex
|
||||||
{
|
{
|
||||||
GLvoid *pData_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pData) + pData_offset);
|
GLvoid *pData_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pData) + pData_offset);
|
||||||
glCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, border, imageSize, pData_ptr);
|
glCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, border, imageSize, pData_ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org.lwjgl.opengl.ARBTextureCompression
|
||||||
|
* Method: nglCompressedTexSubImage3DARBBO
|
||||||
|
*/
|
||||||
|
static void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage3DARBBO
|
||||||
|
(JNIEnv * env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint border, jint imageSize, jint buffer_offset)
|
||||||
|
{
|
||||||
|
glCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, border, imageSize, offsetToPointer(buffer_offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -133,7 +187,16 @@ static void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglGetCompressed
|
||||||
{
|
{
|
||||||
GLvoid *pImg_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pImg) + pImg_offset);
|
GLvoid *pImg_ptr = (GLvoid *)((GLubyte *)(*env)->GetDirectBufferAddress(env, pImg) + pImg_offset);
|
||||||
glGetCompressedTexImageARB(target, lod, pImg_ptr);
|
glGetCompressedTexImageARB(target, lod, pImg_ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Class: org.lwjgl.opengl.ARBTextureCompression
|
||||||
|
* Method: nglGetCompressedTexImageARBBO
|
||||||
|
*/
|
||||||
|
static void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglGetCompressedTexImageARBBO
|
||||||
|
(JNIEnv * env, jclass clazz, jint target, jint lod, jint buffer_offset)
|
||||||
|
{
|
||||||
|
glGetCompressedTexImageARB(target, lod, offsetToPointer(buffer_offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -142,12 +205,19 @@ extern "C" {
|
||||||
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_initNativeStubs(JNIEnv *env, jclass clazz) {
|
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_initNativeStubs(JNIEnv *env, jclass clazz) {
|
||||||
JavaMethodAndExtFunction functions[] = {
|
JavaMethodAndExtFunction functions[] = {
|
||||||
{"nglCompressedTexImage1DARB", "(IIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage1DARB, "glCompressedTexImage1DARB", (void*)&glCompressedTexImage1DARB},
|
{"nglCompressedTexImage1DARB", "(IIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage1DARB, "glCompressedTexImage1DARB", (void*)&glCompressedTexImage1DARB},
|
||||||
|
{"nglCompressedTexImage1DARBBO", "(IIIIIII)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage1DARBBO, NULL, NULL},
|
||||||
{"nglCompressedTexImage2DARB", "(IIIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage2DARB, "glCompressedTexImage2DARB", (void*)&glCompressedTexImage2DARB},
|
{"nglCompressedTexImage2DARB", "(IIIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage2DARB, "glCompressedTexImage2DARB", (void*)&glCompressedTexImage2DARB},
|
||||||
|
{"nglCompressedTexImage2DARBBO", "(IIIIIIII)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage2DARBBO, NULL, NULL},
|
||||||
{"nglCompressedTexImage3DARB", "(IIIIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage3DARB, "glCompressedTexImage3DARB", (void*)&glCompressedTexImage3DARB},
|
{"nglCompressedTexImage3DARB", "(IIIIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage3DARB, "glCompressedTexImage3DARB", (void*)&glCompressedTexImage3DARB},
|
||||||
|
{"nglCompressedTexImage3DARBBO", "(IIIIIIIII)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage3DARBBO, NULL, NULL},
|
||||||
{"nglCompressedTexSubImage1DARB", "(IIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage1DARB, "glCompressedTexSubImage1DARB", (void*)&glCompressedTexSubImage1DARB},
|
{"nglCompressedTexSubImage1DARB", "(IIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage1DARB, "glCompressedTexSubImage1DARB", (void*)&glCompressedTexSubImage1DARB},
|
||||||
|
{"nglCompressedTexSubImage1DARBBO", "(IIIIIII)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage1DARBBO, NULL, NULL},
|
||||||
{"nglCompressedTexSubImage2DARB", "(IIIIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage2DARB, "glCompressedTexSubImage2DARB", (void*)&glCompressedTexSubImage2DARB},
|
{"nglCompressedTexSubImage2DARB", "(IIIIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage2DARB, "glCompressedTexSubImage2DARB", (void*)&glCompressedTexSubImage2DARB},
|
||||||
|
{"nglCompressedTexSubImage2DARBBO", "(IIIIIIIII)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage2DARBBO, NULL, NULL},
|
||||||
{"nglCompressedTexSubImage3DARB", "(IIIIIIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage3DARB, "glCompressedTexSubImage3DARB", (void*)&glCompressedTexSubImage3DARB},
|
{"nglCompressedTexSubImage3DARB", "(IIIIIIIIIILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage3DARB, "glCompressedTexSubImage3DARB", (void*)&glCompressedTexSubImage3DARB},
|
||||||
{"nglGetCompressedTexImageARB", "(IILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglGetCompressedTexImageARB, "glGetCompressedTexImageARB", (void*)&glGetCompressedTexImageARB}
|
{"nglCompressedTexSubImage3DARBBO", "(IIIIIIIIIII)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage3DARBBO, NULL, NULL},
|
||||||
|
{"nglGetCompressedTexImageARB", "(IILjava/nio/Buffer;I)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglGetCompressedTexImageARB, "glGetCompressedTexImageARB", (void*)&glGetCompressedTexImageARB},
|
||||||
|
{"nglGetCompressedTexImageARBBO", "(III)V", (void*)&Java_org_lwjgl_opengl_ARBTextureCompression_nglGetCompressedTexImageARBBO, NULL, NULL}
|
||||||
};
|
};
|
||||||
int num_functions = NUMFUNCTIONS(functions);
|
int num_functions = NUMFUNCTIONS(functions);
|
||||||
extgl_InitializeClass(env, clazz, num_functions, functions);
|
extgl_InitializeClass(env, clazz, num_functions, functions);
|
||||||
|
|
Loading…
Reference in New Issue