Example #1
0
static void Display( void )
{
   glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );

   glPushMatrix();

   glBegin(GL_POLYGON);
   glVertexAttrib2fNV(0, -1, -1);
   glVertexAttrib2fNV(0, 1, -1);
   glVertexAttrib2fNV(0, 0,  1);
   glEnd();

   glPopMatrix();

   glutSwapBuffers();
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttrib2fNV(JNIEnv *env, jclass clazz, jint index, jfloat x, jfloat y, jlong function_pointer) {
	glVertexAttrib2fNVPROC glVertexAttrib2fNV = (glVertexAttrib2fNVPROC)((intptr_t)function_pointer);
	glVertexAttrib2fNV(index, x, y);
}