I want to draw a model with LWJGL and I know that on calling each glVertex method, a JNI call occurs, that is time consuming. Since I have the model in a file, I want to use just one JNI call (add a native method to LWJGL library), and at the native side, get my model vertices from the file (using c language) and draw them all (avoiding a JNI call per vertex).
So, I want to change LWJGL library source and add a function to do this.
my question is, does this feature available in LWJGL, JOGL or in any possible java bindings for openGL?
I want to draw a model with LWJGL and I know that on calling
Share
Use Vertex Buffer Objects to store your vertex data, and make calls to draw as many vertices/triangles is practical with just one call to glDrawArrays, glDrawElements or similar.
This page explains how to use them in LWJGL.
Note that the LWJGL version of the OpenGL docs is rather lacking. Check the OpenGL official site for the C versions which explain their functionality very well.