Skip to main content
GameDev.net gamedev.net
🔒 Locked

[java] Software Design With JOGL

Started by Isolier Aug 28, 2005 at 2:55 PM 1 replies 700+ views
Original Post
Isolier
Isolier
Hello, Well, I am having issues with the way in which I should design a game using JOGL. What I am doing now is this: I have a project in which terrain is generated via a height map. Now, in my GameTerrain class I load the heightmap, generate all the normals, ect. However, in the public void display(GLDrawable gld) method within my GameRenderer class(which is obviously the GLEventListener) I am not sure whether I should use something like GameTerrain.render(gld) which would then get the gl object from within the render method of the GameTerrain class or if I should do something like vertexData = GameTerrain.getVertexList() from within the display() method itself and have all the gl function calls done within the display method instead of passing a gl object to the GameTerrain object and having the gl function calls done in the render method of said GameTerrain object. Am I making any sense here? Does it really matter? Or perhaps I am going about this all wrong in the first place? Anyhow, anyhelp anyone could give me would be very much appreciated. Thank you in advance.
ASL
ASL
Hi there!
Yes you are making sence!
Im using the JOGL bindings too. There really isnt any difference in performance if you go one way or the other. Ofcourse your code will be more elegant if you pass in the GLdrawable or the GL object extracted from the GLDrawable to your method.
Hope it helps!
Matzon
Matzon
or use LWJGL and dont worry about that ;)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.