I have looked around for a in-depth explanation on what is a binary file (For a Opengl Object), how to make them and also how to load them, but I can't find many references... Can someone point me in the right direction?

EDIT. I'm wanting to load a models vertex positions from a file. I currently am using obj but I want to use something faster, such as binary files.

  • 1
    \$\begingroup\$ "OpenGL Object" is a meaningless phrase. Binary files are not GL-specific - GL itself has no knowledge of files or a file system - and many many tutorials exist on manipulating them. Google. \$\endgroup\$
    – 3Dave
    Dec 2, 2016 at 22:46
  • \$\begingroup\$ You didn't even tell what you're trying to load. Is it geometry or textures, or maybe something else. \$\endgroup\$
    – Vlad
    Dec 3, 2016 at 13:49
  • \$\begingroup\$ If you're trying to load vertices from an .OBJ file in binary, then you're doing wrong from the start. OBJ files are always ASCII. Their binary version uses .MOD extension. In addition, .OBJ files are not OpenGL specific, they originate from Wavefront 3D software \$\endgroup\$
    – vlzvl
    Dec 3, 2016 at 16:57
  • \$\begingroup\$ You could make your own binary mesh format and make a small program that takes .obj as an input and outputs into your format. \$\endgroup\$ Dec 3, 2016 at 18:15

1 Answer 1


If you want to load models from a binary file format, you need to implements a special loader for that specific binary format. For example .3ds is/was used quite often in the past. The problem, however, is the lack of a full documentation of the format, as the specifics are not released, just reverse engineered.

A format with full ASCII/Binary documentation for example is Collada which was designed as an exchange format.

If you want to load a couple of objects and learn some basics, stick with Wavefront Object (.obj) as you can easily manipulate it with a simple text editor.

Oh an last, but not least, loading geometry, textures, effects or anything else has nothing to do with OpenGL (or DirectX for that matter).

If you still want to load binary files, you can take a look at this tutorial.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .