Talk:OpenGL Programming/Modern OpenGL Tutorial Load OBJ

Hi.

There's a jump in the text: after loading the vectors with model's data, there's no indication on how to put them in a VBO, while the VBO suddenly appears as vbo_mesh_vertices. At this point of the course this step should be simple, but I think an explicit explanations would be better.

ciao!

--Carotinho (discuss • contribs) 22:30, 12 December 2011 (UTC)

I completely agree with above User. Great tutorial so far. But lost me at 07. Thx for the other tutorials though...

The article does not provide complete code examples nor does it ever instance structure such as "mesh", I managed to work that part out, but the part where the "shared vertices" is introduced makes no sense. Up until now the tutorials have been of excellent quality, keep up the good work!

Glushort for Faces / Elements
If you use GLushort for your elements then you won't be able to draw more complex elements with a large number of vertices. Use GLuint if you need to draw more complex models. Make sure to replace GLushort with GLuint everytime the elements are used. Please make a note of this, as I wasted a lot of time trying to troubleshoot why my model wouldn't load. I understand for games this won't likely be an issue, but for more serious applications this may be an issue. 168.29.75.62 (discuss) 17:31, 5 October 2012 (UTC)
 * The tutorials are meant to work with OpenGL ES too, and GLES says elements indices can be bytes or shorts : http://www.khronos.org/opengles/sdk/docs/man/xhtml/glDrawElements.xml
 * I mentioned this in the tutorial on teapot when it was placed before this one (and it was moved since then) : https://secure.wikimedia.org/wikibooks/en/wiki/OpenGL_Programming/Modern_OpenGL_Tutorial_07#Limit
 * The portable technique is to make several calls to glDrawElements.
 * Do you want to clarify this in the tutorial ? Beuc (discuss • contribs) 16:38, 20 October 2012 (UTC)

Face reader code bugs
This code appears to be buggy, or at least fragile:

} else if (line.substr(0,2) == "f ") { istringstream s(line.substr(2)); GLushort a,b,c; s >> a; s >> b; s >> c;     a--; b--; c--;

When reading in a face such as: f 1//1 2//2 3//3, it chokes, resulting in bad data being loaded into the vector.

Obj Loader for python
Could someone translate the c++ obj loader to python? --BookPortal (discuss • contribs) 05:46, 29 November 2018 (UTC)