Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

davior

OpenGL 3D code producing program

This topic is 6950 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 hope this helps. Here''s how I store my objects:


typedef struct
{
int ver[3]; //vertex
float norm[3]; //flat tri normal (for flat shading)
float pNorm[3][3]; //point normals (for smooth shading)

float texCo[3][2]; //tex coord [point] [x/y]
} obtri_t;


typedef struct
{
unsigned numvers;
unsigned numfaces;

obver_t *ver;
obtri_t *tri;

char texFN[30]; //texture filename
int texNum; //GL texture object
} objectType_t;

typedef struct
{
float rot[3];
float pos[3];
objectType_t *OT;
} object_t;


http://www.geocities.com/ben32768

Share this post


Link to post
Share on other sites
Advertisement
While obviously an idea which needs much refining, I feel that the concept still stands. While producing many lines of code for every object created IS ridiculous, with little thought and tweaking the same concept could produce a single line of code which uses a class or stucture to produce the same results. So essentually, yes, the iniatial idea was ridiculous. But the concept..... Thanks for your inputs. I'll let you know what I come up with, eventually...
davior




Edited by - davior on May 9, 2000 10:51:15 AM

Share this post


Link to post
Share on other sites
My bet is you''ll come up with a .3ds model file reader in an object class


#pragma DWIM // Do What I Mean!
~ Mad Keith ~
**I use Software Mode**

Share this post


Link to post
Share on other sites

  • 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!