glTexImageXD now accept null buffers

This commit is contained in:
Ioannis Tsakpinis 2004-11-25 22:11:16 +00:00
parent c7eed98e57
commit 76de417bf7
2 changed files with 422 additions and 422 deletions

View File

@ -2375,8 +2375,8 @@ static void JNICALL Java_org_lwjgl_opengl_GL11_glTexParameteri(JNIEnv * env, jcl
*/
static void JNICALL Java_org_lwjgl_opengl_GL11_nglTexImage2D(JNIEnv * env, jclass clazz, jint p0, jint p1, jint p2, jint p3, jint p4, jint p5, jint p6, jint p7, jobject buffer, jint offset)
{
const void *address = (const void *)(offset + (GLbyte *)(*env)->GetDirectBufferAddress(env, buffer));
glTexImage2D((GLint) p0, (GLint) p1, (GLint) p2, (GLint) p3, (GLint) p4, (GLint) p5, (GLint) p6, (GLint) p7, address);
GLvoid *buffer_ptr = (GLvoid *)safeGetBufferAddress(env, buffer, offset);
glTexImage2D((GLint) p0, (GLint) p1, (GLint) p2, (GLint) p3, (GLint) p4, (GLint) p5, (GLint) p6, (GLint) p7, buffer);
}
@ -2386,8 +2386,8 @@ static void JNICALL Java_org_lwjgl_opengl_GL11_nglTexImage2D(JNIEnv * env, jclas
*/
static void JNICALL Java_org_lwjgl_opengl_GL11_nglTexImage1D(JNIEnv * env, jclass clazz, jint p0, jint p1, jint p2, jint p3, jint p4, jint p5, jint p6, jobject buffer, jint offset)
{
const void *address = (const void *)(offset + (GLbyte *)(*env)->GetDirectBufferAddress(env, buffer));
glTexImage1D((GLint) p0, (GLint) p1, (GLint) p2, (GLint) p3, (GLint) p4, (GLint) p5, (GLint) p6, address);
GLvoid *buffer_ptr = (GLvoid *)safeGetBufferAddress(env, buffer, offset);
glTexImage1D((GLint) p0, (GLint) p1, (GLint) p2, (GLint) p3, (GLint) p4, (GLint) p5, (GLint) p6, buffer_ptr);
}

View File

@ -85,8 +85,8 @@ static void JNICALL Java_org_lwjgl_opengl_GL12_nglDrawRangeElementsVBO
static void JNICALL Java_org_lwjgl_opengl_GL12_nglTexImage3D
(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jobject buffer, jint offset)
{
const void *address = (const void *)(offset + (const GLbyte *)(*env)->GetDirectBufferAddress(env, buffer));
glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, address);
GLvoid *buffer_ptr = (GLvoid *)safeGetBufferAddress(env, buffer, offset);
glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, buffer_ptr);
}