I'm trying to draw an object correctly, i don't really get it correct and i guess it is because i have not aligned the vertices because i really dont know exactly how to do it. How someone can explain them a little bit.
All the vertices are stored this way:
Code: Select all
typedef struct { float			u, v; 
					 unsigned int			color;
					 float			x, y, z; } ObjVertexB;	// vertex to render
	typedef struct { unsigned int	iNumberOfVertices;
					 ObjVertexB		*Vertices; } ObjStrip;
	typedef struct _MeshB {	unsigned int	iNumberOfStrips;
							ObjStrip		*Strips; } MeshB;i create them using this code:
Code: Select all
tmpObj->iNumberOfStrips = tmpStrips;
		tmpObj->Strips = (ObjStrip*)malloc(tmpStrips * sizeof(ObjStrip));
tmpObj->Strips[iStripNr].iNumberOfVertices = tmpStripsSize[iStripNr];
		tmpObj->Strips[iStripNr].Vertices = (ObjVertexB*)malloc(tmpStripsSize[iStripNr] * sizeof(ObjVertexB));Code: Select all
tmpObj->Strips[iStripNr].iNumberOfVertices = tmpStripsSize[iStripNr];
		tmpObj->Strips[iStripNr].Vertices = (ObjVertexB*)malloc(tmpStripsSize[iStripNr] * sizeof(ObjVertexB));
		greets ghoti
