How to store textures?
Hi,
I''m interested in "how store textures for an mesh".
I''ve code a lilte 3d engine, and i run in confusion, at that point where the question came up, how to store my textures for an mesh. I will try to explain where my problem lay. I''ve an mesh
, it''s an cube (for this example *g*), the six side of this cube have different textures, mean i have six textures at all. Ok but my mesh is one array of vertices, normals, texture coordinates.
So how did i know while i''m rendering, which texture must set to my renderer, and which not. Must i store for every polygon an id that identify the correct texture??? Or im totaly wrong here??
Pls help me out in my confusion :D
Thx Imp
bugs are uncommented features...
Stay Evil & Ugly!
For flexibility (3DS format for example): store position, normal, color, material, texture id and coordinate for each vertex.
For speed (md3 format): group vertex who share the same info and use strip and fan polygons.
For speed (md3 format): group vertex who share the same info and use strip and fan polygons.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement