Exemple #1
0
// display() draws a triangle at an angle
static void display(void) {
    glClear(GL_COLOR_BUFFER_BIT);

    glColor3f(1.0f, 0.75f, 0.0f);
    glBegin(GL_TRIANGLES);
    glFogCoordf(f1);
    glVertex3f(2.0f,-2.0f,0.0f);
    glFogCoordf(f2);
    glVertex3f(-2.0f,0.0f,-5.0f);
    glFogCoordf(f3);
    glVertex3f(0.0f,2.0f,-10.0f);
    glEnd();
    glutSwapBuffers();
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglFogCoordf(JNIEnv *env, jclass clazz, jfloat coord, jlong function_pointer) {
	glFogCoordfPROC glFogCoordf = (glFogCoordfPROC)((intptr_t)function_pointer);
	glFogCoordf(coord);
}