   I need to learn how to load a mesh in OpenGL...
  I need to learn how to load a mesh into opengl I'm currently using FreeGlut. Problem is I don't know what file format or how to start to do this. I know it's most likely a function within the api and this is probably really simple but well... I need help. I've found several files for meshes but they have all different extensions.. apprently they are all models.... there is a.wrl and the .3ds.... are both valid? could I use either one or what? any tips would be apreicated.   
  There are no opengl api functions related to loading models. Opengl simply accepts lists of triangles and lists of vertices. Transforming data formatted in certain filetypes to these lists is the responsibility of the user. However even though it is not part of the OpenGL API, there are many libraries out there that will assist with loading one type or another, such as Assimp. Or you can write the interpreter yourself. OBJ is a common format to use for beginners as it is pretty simple. But basically you can use any format, but you must parse it into arrays of vertices for OpenGL to understand.   ;There are no opengl api functions related to loading models. Opengl simply accepts lists of triangles and lists of vertices. Transforming data formatted in certain filetypes to these lists is the responsibility of the user. However even though it is not part of the OpenGL API, there are many libraries out there that will assist with loading one type or another, such as Assimp. Or you can write the interpreter yourself. OBJ is a common format to use for beginners as it is pretty simple. But basically you can use any format, but you must parse it into arrays of vertices for OpenGL to understand.Oh thanks... I found this code http://openglsamples.sourceforge.net/files/glut_obj.cppThing is it says it needs they need to be triangulated.... With is that? BTW If I use that I can simply create taht into a whole function and just call it whenever needed correct?   ;  You could try using Assimp.   ;  Triangulated means that the model cannot contain any quads. OBJ faces can have 3 or 4 (or more?) vertices per face. Triangulated means that everything is broken up into triangles.   ;  Hi,When I first tried looking into ASSIMP I was pretty noobish and it was all a bit much for me to take in and took a while to get it working but then again it does take me a while to figure things out in general.Anyway you might want to look into this:http://www.3dcodingt...etting-GLM.htmlIts called GLM and is used to load .obj models. I haven't had a chance to have a proper look yet but it looks pretty simple and a lot lighter than ASSIMP which does pretty much everything.EDIT: Beat me to it........As for triangulated meshes, its pretty standard and can be done with the simple click of a button in most modelling programs e.g. Maya.It just means that the mesh consists only of triangles but it all depends what the model loader is set-up to work with. In that tutorial the model loader is only set up for triangulated meshes as it accepts 3 vertices for each face so if there are any faces with more than 3 vertices it will cause an error or draw weird.Good luck.   ;Hi,When I first tried looking into ASSIMP I was pretty noobish and it was all a bit much for me to take in and took a while to get it working but then again it does take me a while to figure things out in general.Anyway you might want to look into this:http://www.3dcodingt...etting-GLM.htmlIts called GLM and is used to load .obj models. I haven't had a chance to have a proper look yet but it looks pretty simple and a lot lighter than ASSIMP which does pretty much everything.EDIT: Beat me to it........As for triangulated meshes, its pretty standard and can be done with the simple click of a button in most modelling programs e.g. Maya.It just means that the mesh consists only of triangles but it all depends what the model loader is set-up to work with. In that tutorial the model loader is only set up for triangulated meshes as it accepts 3 vertices for each face so if there are any faces with more than 3 vertices it will cause an error or draw weird.Good luck.Ah alright well how do I triangulate the file? I downloaded maya 2012 I just want to triangulate the thing....   ;  Find yourself a model loader, I use 3DS, it could be .LWO, or .OBJ or whatever you want.........(i)Add  ->>> #include <fstream.h> at the beginning of your programNext find the draw calls-->>>    //----------------------------------------------------------------------------------------glBegin(GL_TRIANGLES);  glVertex3f( pointerX[0], pointerY[0], pointerZ[0]);glVertex3f( pointerX[1], pointerY[1], pointerZ[1]);glVertex3f( pointerX[2], pointerY[2], pointerZ[2]); glEnd();//----------------------------------------------------------------------------------------Add something like the following to have this model loading program spit out vertex arrays which openGL loves.//----------------------------------------------------------------------------------------ofstream out("modelNameVertexArray.cpp"); //_THIS WILL CREATE A TEXT FILE WITH THE SPECIFIED NAME//-------------------------------------------------------------------------------------glBegin(GL_TRIANGLES);    //-------------------------------------------------------------------------------------    glVertex3f( pointerX[0], pointerY[0], pointerZ[0]);   out <<  pointerX[0]  << pointerY[0] << pointeZ[0]<<",/n" // THESE OUTPUT LINES WILL CREATE A LINE  OF CODE IN THE TEXT FILE FOR EVERY DRAW CALL.    //------------------------------------    glVertex3f( pointerX[1], pointerY[1], pointerZ[1]);   out <<  pointerX[1]  << pointerY[1] << pointeZ[1] << ",/n"    //------------------------------------    glVertex3f( pointerX[2], pointerY[2], pointerZ[2]);   out <<  pointerX[2]  << pointerY[2] << pointeZ[2] << ",/n"    //-----------------------------------------------------------------------glEnd();//--------------------------------------------------------------------------------------------------------------Once you have the output file use #include "modelNameVertexArray.cpp" to include the vertex datathen use something like glDrawArrays(,,); to render the model.I havn't posted the source code for this yet but I'll e-mail you a copy ->>darthidious@gmail.com   