Im trying to render different 3D-models in open-gl ES 2. I created some models with Cinema4d and export them as an .obj wavefront file. Then I use the really helpful perl script (https://github.com/HBehrens/obj2opengl) to convert that into a headerfile. The reason for this is that the Vuforia (https://www.qualcomm.com/products/vuforia) Example, which supports augmented reality, render their models from a header-file too. My problem is, that the header file is often 7 times bigger than the .obj file (same model!) and the first rendering lets lagging my application. What can I do about this problem?
Asked
Active
Viewed 458 times
1
-
1don't use a header but instead read from the obj at run time (or preprocess it first to make it cheaper) – ratchet freak Jan 23 '15 at 20:49
-
I doubt that Vuforia requires their data to be in a header file, but there is no example code at the link you provided. – Drew Dormann Jan 23 '15 at 22:13
1 Answers
0
Vuforia does not require putting models in a header file; they do that in the samples for simplicity.
I suggest you pick a simple model loader/renderer for obj, there are tons of them out there (or even use a simple game engine). For example, look at the answers to a similar question: Lightweight OBJ mesh file loader for C/C++?

Community
- 1
- 1

Blair MacIntyre
- 463
- 3
- 10