From: Pepijn V. E. <pep...@lu...> - 2003-04-28 14:39:01
|
> Guys, > > For my part, I have noticed that GL4Java has some bugs > in it that it seems should be addressed going forward. So > I am trying to work through those on my own. One of the > biggest is the fact that multiple canvases cannot be displayed > and removed from a container ad infinitum on the Windows > platform. What is the exact problem there? Personally I've had problems with the component being disposed too early and then not reiniting itself. I searched through the awt documentation and gl4java source code and came up with the following: - The GLCanvas is inited(first paint iirc) and released in a variety of places. It is for example released in response to windowClosing events. - AWT components init and release their peer inside the addNotify and removeNotify respectively. I've modified the GLCanvas to behave in the second way. This seems to work just fine for me. The only real issue I could come up with is that you will lose your context if you remove the GLCanvas from the AWT component tree. If you then add it again later, a new context will be created and all you're display lists, textures, ... will have disappeared. Do you think this is an issue, or should the GLCanvas generate some kind of contextLost event allowing applications to handle this gracefully? > The point I am making is that Sven has given us a gift of a > GREAT DEAL of source code. Are there bugs in it? Yes. > Does it need to be updated going forward? Yes. But in the > final analysis you're getting something for nothing more than > a little elbow grease. If we all team together and move in a > coordinated fashion perhaps many of you would not have > these concerns. Check out the source code. Build it. > Despite what people say, it is not THAT difficult, and that's > coming from a guy with a linux desktop, a Dell Win2000 > laptop, and a TiBook. I didn't mean to say the code itself was difficult, only the way in which it is built. (Although I have to admit I find certain bits of the java code very strange. Maybe a study group would be a good idea ;) ) > OpenGL 2 WILL BE available in > GL4Java if I have to do it myself, but I would appreciate help. > Shaders are trivial to implement, if you look at the code you > will see exactly how to do it. Add the necessary functionality > to the OpenGL_JauJNI14_funcs.c file and the GLFunc*.java > files and rebuild. It IS NOT dead, as long as you are willing > to do what it takes to use it. In the current state it's not that straightforward. Well actually it is but there are some complications. The OpenGL_*_funcs.c file is largely autogenerated, so you have to add the new code that you program by hand to the files in the C2J/manual(iirc) directory. To me this is what initially caused the most confusion, because everything (generated bits, manual bits and concatenated files) is all checked in to the cvs repository. This is the reason why I cleaned up (imho) the build process. I've been wondering if it's worth it to keep this autogenerating stuff. The C2J parser is great to generate the inital version of the file, but is it worth it to have it in the cvs with the rest of the code and actually invoke it in the makefile? Pepijn |