Jump to content
  • Advertisement
Sign in to follow this  
RSC_x

how can i use draw 3ds model on standard not wireframe.

This topic is 4093 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i hawe some trouble with loading models. are anyone know how can i conwert my wireframe models to standard shape style . my loader draws just wireframes but when i use GL_TRIANGLES or something other it draws random things. it hawe some data calling normals uv
float *V1;
int *V2;
glColor3f (1.0f, 1.0f, 0.0f);   
free(V1);
free(V2);


above thing is my 3ds loaders drawing system but it just supports raw/wireframes i cant draw objecs as they seen on 3ds max or any editor. are anyone knows somthings about that. thanks. EDITED:oh and i think now it looksgood?[pig] [Edited by - RSC_x on September 26, 2007 4:15:32 PM]

Share this post


Link to post
Share on other sites
Advertisement
Quote:

free(V1);
free(V2);
delete [] V1;
delete [] V2;

That's...just wrong.

As for your problem, you can't just switch from GL_POINTS to GL_TRIANGLES to GL_QUADS or whatever and expect things to work. Switching the primitive type often requires changing the data submission order. And that depends on the order the data actually exists in. Are you sure it's not indexed data, as well?

More information is required, as is a more detailed description.

Share this post


Link to post
Share on other sites
Quote:
Original post by jpetrie
Quote:

free(V1);
free(V2);
delete [] V1;
delete [] V2;

That's...just wrong.


thanks but it draws points/vireframe when i use gl_points i just cant draw data as standard model.
i think my problem is about opengl.
anyway on gcc it didn't give me any errors.
or may be wrong but it works and data looks correct,
just somthig on draving sytem looks wrong, like opengl.?

and yes it looks like it uses indexed data.
but i tryed it and its not working .
when i try indexs it just draws random .
note:i think i know how normals works but i tested it just wits small lists not on biggest and standard things.
so may be i'm coding normals wrong.?

Share this post


Link to post
Share on other sites
Also, it seems that your normal data is probably mixed in with your vertex data, so GL_V3F is wholly inappropriate.

Share this post


Link to post
Share on other sites
Quote:
Original post by Dancin_Fool
Why are you using a delete without a new? Never mix malloc and free with new and delete. Either program in c, or program in c++.


hey thanks man but i think i should start to care about security later.
anyway now it works somehow.


here is the parameters using by the 3d model draving thing.

pMesh->pFaces.A //unsigned int --unknown thing !
pMesh->pFaces.B//unsigned int --unknown thing !
pMesh->pFaces.C//unsigned int --unknown thing !
pMesh->pTexs.tu //float --unknown thing !
pMesh->pTexs.tv //float --unknown thing !
pMesh->pVerts.x //float -- vertex pointer --point adress
pMesh->pVerts.y//float -- vertex pointer --point adress
pMesh->pVerts.z//float -- vertex pointer --point adress
pMesh->szMeshName //char [256] //objects name. needed if mere then one objects exists.?


the x,y,z, are stores the vertex or adress of the poins.
so can anyone explain what others may be?
or how can i draw this like 3ds editors do.
i passed the reading /loading object part but i hawe problems on drawing it.

when i use xyz that draws poins correctly.but just as wireframe with lines or points.
not with triangles.

thanks.

Share this post


Link to post
Share on other sites
Quote:
Original post by Ravuya
Also, it seems that your normal data is probably mixed in with your vertex data, so GL_V3F is wholly inappropriate.


what do you recommend ?
are you hawe any idea about hoe can i use that normals.
i think something on my text cord pointer is wrong or loaders just text cord pointer part is wrong.
its not in the abowe examples because its not working.
can anyone give me an example about how can i use normal pointers with this
and if the wrong thing is normals how?
thanks.


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!