added an example on how to use the callback from java

This commit is contained in:
Luke Holden 2002-11-29 09:19:39 +00:00
parent 9010e33568
commit f856619f1f
1 changed files with 8 additions and 0 deletions

View File

@ -37,3 +37,11 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLU_deleteQuadric
/* delete any callbacks we assigned to the quadric */
CallbackManager.del(quad);
}
then from java:
/* myquadric is a reference to a GLUquadricObj returned by glu.newQuadric()
* GLU.ERROR is the callback type
* errorCallback is the method you wish to be called */
glu.quadricCallback(myquadric, GLU.ERROR, "errorCallback");