I’m working on a 3D game and now I have to place every object in code. So is there a way to make a editor to place objects in Java OpenGL?
And is it best to make the whole world (it’s kind of huge) one big mesh or is it better to do another way?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are no objects in OpenGL. Confused?
OpenGL just draws things, it’s given some sort of “canvas” by the operating system and you can tell it to draw points, lines and triangles to your desire.
Anything related to a scene or managing objects is your burden, or that of an additional toolkit.
Think about it: Instead of hardcode your data, read it from a file and use the file’s contents to build a scene, which is then drawn using OpenGL. This is not much unlike reading, say a text file and printing text to the user. Same principle, only different kind of data.
There are plenty of 3D modellers. An excellent, open source one is Blender. Export the model and/or scene to some file format you can read (either by implementing an existing one, or inventing your own one and write an exporter) and render it using your code.