I want to load a model in any format with lighting and bump mapping using OpenGL with shaders. Where can I find examples on c++ or java?
Share
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.
I don’t think your question has a simple answer. There is neither any single, nor any “mostly used” standard model file format for 3D engines. While there are a couple of standards, most of them are old and don’t support many features, so many engines use their own file formats that fit their own requirements.
The standards that do exist, such as Ogre XML, are not even particularly commonly used, and when they are used, it’s mostly for “behind the scenes”-work when creating the models, and are then often “compiled” to some engine-specific format for actual inclusion in a game or program.
You can study some open-source libraries, such as JME, the Jogamp samples or Ogre and see how they load models, but I haven’t seen any “simple” examples. The Jogamp samples are probably the most simple, but they are also somewhat overly simple; they certainly don’t include any bumpmapping or such.
If you want lots of features without having to implement it all yourself from scratch, then you’re probably better off using some premade game-engine library such as JME or Ogre, rather than using OpenGL directly.