Jump to content
  • Advertisement
Sign in to follow this  
Isolier

[java] Software Design With JOGL

This topic is 4769 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!