Re: Jogl code typical structure
Posted by devildon on
URL: https://forum.jogamp.org/Jogl-code-typical-structure-tp4033822p4033824.html
Hi, thanks a lot for the reply.
No, I don't use any 3D engine. I implemented the graphics just by using geometry and I do use static draw for static objects, as you suggested.
One of the problems I have is that the 3D world is "dynamically" created as all the points data to be drawn are stored in a database and they might change event frequently. So every time the application starts it loads data from the DB, it builds all the Java objects and then it "translates" them in the OpenGL 3D objects (mainly VBOs). At the beginning the application starting time was huge, but then I considerably reduced it. Anyway, as you can see, I still have the problem that I can't recycle the vertices too much, since I need to build the 3D world time by time. The procedure which I use to build a 3D object starting from a Java object doesn't let me re-use vertices.
As far as I understood from your answer, shaders are essential to improve performance and you also use them for colors picking. But unfortunately I'm unfamiliar with shaders. Could you please suggest me a good manual? I mean possibly a kind of step by step guide... but any suggestion will be welcome.
About the OpenGL, I started studying them a few months ago: I firstly read songho examples and then I found other matherial and books. Finally I started using the JOGL wrapper as I needed to develop my application in Java. I think it's fine, even if I believe the hard part comes when you want to improve performance (of course :D).