purpose of the existence and freakin collada/obj files -help
Posted: December 8th, 2017, 11:11 pm
okey , i finaly managed to create some directx11 framework like thing . ( actually it is dirty compilation of tutorials vs vs )( especially chili framework helped a lot thnks bro )
anyway i figure out to export human readable mesh data from blender (dae , obj )
and the problem occurs in here:
after i read vertex , normal , tex coordinates
i simply make an unindexed array of meshes like this
example code:
struct MeshData
{
XMFLOAT3 Pos;
XMFLOAT3 Norm;
XMFLOAT2 Tex;
};
//*****
// read data from file
//*****
std::vector<MeshData > vertexDat;
for(int i = 0 ; i < indexSize ; i++)
{
MeshData tmp;
tmp.Pos = posArray[pos_indices]; // pos x , y , z
tmp.Norm = normalArray[norm_indices]; // norm x , y , z
tmp.Tex = textureArray[tex_indices]; // texx w ,s
vertexDat.emplace_back(tmp); // stored per vertex data
}
this dang thing actually works but it doesn't makes sense because that makes my all draw calls unindexed so is there a problem ? Or what should i do ?
in some sphere models i compared all generated vertex data to each other and only 30 - 40
vertex data is same in 3k vertex count...
im lost help and sorry for shit tier eng
anyway i figure out to export human readable mesh data from blender (dae , obj )
and the problem occurs in here:
after i read vertex , normal , tex coordinates
i simply make an unindexed array of meshes like this
example code:
struct MeshData
{
XMFLOAT3 Pos;
XMFLOAT3 Norm;
XMFLOAT2 Tex;
};
//*****
// read data from file
//*****
std::vector<MeshData > vertexDat;
for(int i = 0 ; i < indexSize ; i++)
{
MeshData tmp;
tmp.Pos = posArray[pos_indices]; // pos x , y , z
tmp.Norm = normalArray[norm_indices]; // norm x , y , z
tmp.Tex = textureArray[tex_indices]; // texx w ,s
vertexDat.emplace_back(tmp); // stored per vertex data
}
this dang thing actually works but it doesn't makes sense because that makes my all draw calls unindexed so is there a problem ? Or what should i do ?
in some sphere models i compared all generated vertex data to each other and only 30 - 40
vertex data is same in 3k vertex count...
im lost help and sorry for shit tier eng