! gl4gcj

!! Installation

 % ./configure 
 % make 
 $ make install

Following files are installed.

 $(prefix)/lib/libgl4gcj.a
 $(prefix)/lib/libglut4gcj.a
 $(prefix)/share/java/ext/gl4gcj.jar
 $(prefix)/share/java/ext/glut4gcj.jar
 $(prefix)/include/gl4gcj/**/*.h
 $(prefix)/include/glut4gcj/**/*.h

!! Usage

!!! Write SimpleSDLApp.java using gl4gcj API

 //////////////////////////////////////////////////////////// 
 import glut4gcj.*;
 
 class SimpleGLApp extends GLUT implements DisplayFunc, KeyboardFunc
 {
 	public void display()
 	{
 		glClear(GL_COLOR_BUFFER_BIT);
 		glutWireTeapot(0.5);
 		glFlush();
 	}
 
 	public void keyboard(byte key, int x, int y)
 	{
 		if (key == 'q' || key == 'Q' || key == '') System.exit(0);
 	}
 
 	public static void main(String[] args)
 	{
 		try
 		{
 			glutInit(args);
 			glutInitDisplayMode(GLUT_RGB);
 			glutCreateWindow("Test");
 
 			SimpleGLApp test = new SimpleGLApp();
 			glutDisplayFunc(test);
 			glutKeyboardFunc(test);
 
 			glutMainLoop();
 		}
 		catch (Exception e)
 		{
 			e.printStackTrace();
 		}
 	}
 }
 //////////////////////////////////////////////////////////// 

!!! Compile your GL application on UNIX like system

% gcj --main=SimpleSDLApp -o SimpleSDLApp SimpleSDLApp.java \
	--extdirs=$(prefix)/share/java/ext -L/$(prefix)/lib \
	-lglut4gcj -lgl4gcj -lglut -lGL 


!!! Compile your GL application on MinGW system

% gcj --main=SimpleSDLApp -o SimpleSDLApp.exe SimpleSDLApp.java \
	--extdirs=$(prefix)/share/java/ext -L/$(prefix)/lib \
	-lglut4gcj -lgl4gcj -lglut32 -lopengl32 





