I've checked in code into CVS which adds an opengl 1.1 binding to
sdljava!! Later version of OpenGL coming soon.
The binding is provided by wrapping GLEW (http://glew.sourceforge.net).
GLEW is a library which handles all the specifics of the OpenGL
support. GLEW is available for a vast number of platforms.
Currently I've only updated the linux Makefile to build the shared
library (gljava). It should be trivial to compile under Windows if the
same idea if followed as the linux Makefile. I will be updating the
Windows scripts in the future.
Two new methods were added to SDLSurface:
public GL getGL() throws SDLException
- will return an instance of GL interface IF the surface has
SDL_OPENGL set. The surface must be a framebuffer surface and must have
been initialize with SDL_OPENGL
public void glSwapBuffers()
- will swap the OpenGL buffer
There are also two (simple) example of how to use it in:
testsrc/org/gljava/opengl directory
Finally I have created a separate sourceforge project for the binding
called: gljava (gljava.sourceforge.net). The idea is that I want to
provide a generic opengl binding for java that does not depend on sdl.
The gljava project will offer this.
sdljava will always contain the latest gljava code and be distributed
with it so sdljava will always provide an opengl binding.
This will be integrated into the next release.
Thanks. Please let me know any feedback.
-Ivan/
|