hi
i am working with lib3ds
and here is a part of file
float Trivert[64][3];
Lib3dsMesh *testmesh;
void Load3Ds(const char *Filename, float Trivert[64][3])
{
//Function is just started
Lib3dsFile *testfile;
Lib3dsIo *testio;
printf("Testing of 3ds file in OpenGL
");
printf("how to load 3ds file for reading data
");
testfile = lib3ds_file_open(Filename);
fprintf(stdout,"before assginig array
");
for(int i=0;i<=(testfile->meshes_size)/12;i++)
lib3ds_quat_copy(Trivert[i],testfile->meshes[0]->vertices[i]);
fprintf(stdout,"array assigned successful
");
//Success
}
Here My Problem is
As i make Trivert[64][3]
a big block in memory
i want to make
a pointer *Trivert[3]
i am not Guru in programming
so is *Trivert[3] means Trivert[3]as_long_we_assign]
or
Trivert[as_long_we_assign][3]
and i want to do that because if the file contains more than 65 points then this Trivert[64][3]
may be give up and if less then 65 points then the remain are going to be waste
i ry to make that *Trivert[3] with change in thus assigning Trivert suitably
programme get compiled but on running it give me a segmentation error without that it just works and objects get created
Please help me
i am just a beginner in OpenGL
thanks in advance