Advertisement

How to store textures?

Started by August 07, 2001 06:20 AM
1 comment, last by Impz0r 23 years, 6 months ago
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.
Advertisement
hi,

first, thx for your fast answer :D

That means i''m lay right with my solution, to store for every polygon an id to identify the correct texture. Is that the best way, you explain here, or is there an other, better solution to do this well???


Thx Imp
Stay Evil & Ugly!

This topic is closed to new replies.

Advertisement