Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Edin M.

Member Since 21 Apr 2006
Offline Last Active Feb 22 2014 03:14 AM

Topics I've Started

VBO .obj .3ds and some concept questions

16 May 2011 - 05:48 AM

So I have .obj file and I want to load it into opengl app using VBO and GL_ELEMENT_ARRAY_BUFFER. It's no production code so I don't care about performance (I'll consider it later). I have trouble "conveting" uv, vertex, and indices data to ones "VBO-friendly".

I'm using C++ and not much libraries. I'm learning opengl so I do not wish to use some engines or scene graphs. I understand very well C++ and pretty much opengl. I've written .obj importer and display of object but using immediate mode. Now I have switched to OpenGL 3.3 and I don't care about .obj normals (I'll consider/recalculate them later).

I have some example where .3ds loader is used and no data manipulation is done. Just loaded from .3ds to array and from arrays to opengl. My 3D content creating application doesn't have .3ds exporter but I can make one except I don't know how. I know technical details (C#, plugin writing etc...) but I don't know how to convert some vertex/uv/faces data to .3ds or to let's call it "VBO-friendly".

For example, a triangulated cube, has 8 vertices, 20 UVs and 12 faces in .obj file (I suppose same would be for my application component object model if I were writing a plugin). On the other hand .3ds file has 20 vertices, 20 UVs and 12 faces.

I understand texel and vertex array need to be same size so indices from GL_ELEMENT_ARRAY_BUFFER would reference elements of those arrays. How can I convert .obj data into .3ds/vbo-friendly data. Where do additional 12 vertices came from for that cube example. I have managed to do some kind of conversion but when I tried another model it didn't work.

I've gone through some examples and loaders but some are just too complex, and another are lame. How would you translate data from .obj to .3ds ? (That seems like the best option, I translate to .3ds style and use that data).

P.S. I have read any topic and article I could find about ".obj to opengl"

initialization failed in projects with textures

21 April 2006 - 11:00 PM

I have a problem... On lessons that uses texturing we need to have 3 files in folder where is project. glaux.pas glaux.dll glaux.dcu I got those 3 files from web and when I try to run program from project that has god drawing textures everytime it say: "initialization failed". maybe I don't have those 3 correct files, so if anyone has those 3 files and it works to him, please upload or send to email mayatitan@gmail.com . or maybe something else is wrong. p.s. I use Delphi 7.

PARTNERS