Question

I'm loading some scenes/objects from files using assimp, and I had them displaying properly earlier — but rewrote my MVP matrix setup (which had been terribly written and was incomprehensible).

Now, most primitives which I draw in the standard rendering pipeline seem to be appearing just fine. I have a wireframe cube around the origin and can also put in a triangle. But no matter what I do, my ASSIMP-loaded object refuses to be rendered, as a wireframe or as a solid.

I suspect the mistake I'm making is terribly obvious. I've tried to reduce the code to a minimal example.

The object should look like a rock and it should show up within the wireframe box.

Since I haven't much altered the mesh code, I'm guessing the problem is in scene.h or main.cpp.

The old version had GLSL programs, but I eliminated all mention of those here. My understanding from the OpenGL Superbible is that shaders aren't required, though. So that can't be it, right?

Was it helpful?

Solution

The old version had GLSL programs, but I eliminated all mention of those here. My understanding from the OpenGL Superbible is that shaders aren't required, though.

They are if you want to use generic vertex attributes via glVertexAttribPointer(). Without a shader OpenGL has no way of knowing attribute 0 is a vertex or 1 contains a texture coordinate.

Use glVertexPointer() and friends if you don't want to use shaders.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top