LWJGL discussion forum officially migrates here today!

Started by princec, June 10, 2003, 15:01:25

Previous topic - Next topic

princec

Well, we can either do
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
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 :)

elias

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