I get this err when trying to use sscanf:
Code: Select all
warning: format '%f' expects type 'float *', but argument 3 has type 'double'
Code: Select all
sscanf((ReadBuffer+2), "%f%f%f",tmpObj->m_Vertices[ vc ].x, tmpObj->m_Vertices[ vc ].y, tmpObj->m_Vertices[ vc ].z);
here the code i use to create the tmpObj:
Code: Select all
typedef struct { float x, y, z; } ObjVertex; // the vertex
typedef struct { float x, y, z; } ObjNormal; // the normal
typedef struct { float u, v; } ObjTexCoord; // texture coordinates
typedef struct {
unsigned int *m_aVertexIndices,
*m_aNormalIndices,
*m_aTexCoordIndices;
unsigned int m_iVertexCount;
} ObjFace; // face
typedef struct _Mesh {
unsigned int iNumberOfGroups;
ObjVertex *m_Vertices;
ObjNormal *m_Normals;
ObjTexCoord *m_TexCoords;
ObjFace *m_Faces;
unsigned int *iSplit;
unsigned int m_iNumberOfVertices,
m_iNumberOfNormals,
m_iNumberOfTexCoords,
m_iNumberOfFaces;
} Mesh;
any ideas?