Hello Guest

LWJGL discussion forum officially migrates here today!

  • 31 Replies
  • 42115 Views
*

Offline princec

  • *****
  • 1929
    • Puppygames
LWJGL discussion forum officially migrates here today!
« Reply #30 on: June 14, 2003, 15:14:19 »
Well, we can either do
Code: [Select]

void Java_blah_vertexPointer(int a, int b, int c, jobject vertexBuffer) {
void * buf = GET_BUFFER_ADDRESS(vertexBuffer);
glVertexPointer(a, b, c, buf);
}

or we can do
Code: [Select]

void Java_blah_vertexPointer(int a, int b, int c, jobject vertexBuffer) {
void * buf = getBufferAddress(vertexBuffer);
glVertexPointer(a, b, c, buf);
}


One will end up with a pretty big dll, one won't. Unless the compiler inlines getBufferAddress for us.

Cas :)

*

Offline elias

  • *****
  • 899
    • http://oddlabs.com
LWJGL discussion forum officially migrates here today!
« Reply #31 on: June 14, 2003, 15:37:49 »
The function thing won't work unless you pass the JNIEnv * too, and in that light I'd prefer a macro or simply

 void * address = env->GetDirectBufferAddress(buffer);

Any reason not to use the function directly?

 - elias