Hello, I've recently started learning OpenGL in a bid to start working on 3D games, but I'm having a slight problem with loading in a .obj mesh.
I am loading and drawing the mesh, along with texturing it, which all seems to be working just fine, yet when the mesh is drawn, it seems as if the bottom half is cut off.
The mesh I am loading is just a simple cube, but only the top half is drawn.
It almost seems as if I am drawing two separate windows, and the mesh crosses the allotted area for the top window, yet if I draw a glutSolidCube in place of the box.obj, it draws the whole thing with no problem.
Sorry if this is all a bit confusing. If necessary I will put up my code, the only problem being it is split into a number of different files and could be confusing
The vertices in your mesh probably have a funny winding. I think OpenGL is counter clockwise by default. You can try changing it using glFrontFace(GL_CW).
At first I thought it was to do with the viewing volume, but it seems that moving the camera closer has no effect, but that is exactly how it looks
I tried using glFrontFace(GL_CW), (thanks for the tip) but it still draws the mesh in the same, incomplete, manner
I'm really stuck with this. I'm going to try rotating it around the x axis and see what happens
EDIT: Interesting. Rotating around the x axis, the whole cube is visible, yet I still have a problem when rotating around y
Another edit: Little strange, but it seems as if the problem has fixed itself. Wish I knew what happened so I could explain it to anyone else facing the same problem, but I'm not entirely sure what I changed to make it work