I'm trying to get texturing to work now, and having some trouble with it, I get an accessviolationexception on my drawelements call. The project is here, I was hoping someone could take a look.
Posted Thursday, 20 October, 2011 - 23:55 by patrickm
I'm pretty sure it has something to do with the way I'm setting up GL.InterleavedArrays, or my vertex structure, I'm just not sure how exactly to diagnose this issue. I tried the debug version of the library and didn't really get any more information.
Comments
Re: Attempting to do texturing, getting an ...
I'm pretty sure it has something to do with the way I'm setting up GL.InterleavedArrays, or my vertex structure, I'm just not sure how exactly to diagnose this issue. I tried the debug version of the library and didn't really get any more information.
Re: Attempting to do texturing, getting an ...
Ok, I've got it working, but it just displays a black cube now. All I changed was the line:
GL.InterleavedArrays(InterleavedArrayFormat.T2fN3fV3f, 0, IntPtr.Zero);
in mesh.bindvertexbuffers, to:
GL.VertexAttribPointer(0, 2, VertexAttribPointerType.Float, false, 32, 0);
GL.VertexAttribPointer(1, 3, VertexAttribPointerType.Float, true, 32, 8);
GL.VertexAttribPointer(2, 3, VertexAttribPointerType.Float, false, 32, 20);
Black cube is better than error message, but I'm not sure what is still wrong...