ibizaman / bogey

Best Open Game Ever, Yeah !
2 stars 1 forks source link

Create cube with textures #8

Closed ibizaman closed 11 years ago

ibizaman commented 12 years ago

We should be able to easily add cubes with textures. There should be 6 faces (obviously) and only 3 textures : top, side and bottom.

ibizaman commented 12 years ago

There is no way to use less than 24 vertices when creating a textured cube :

    5-----6
   /|    /|
  / |   / |
 1-----2  |
 |  7--|--8
 | /   | /
 |/    |/
 3-----4

The most efficient way, using textures, is to define a triangle strip for each face with its own vertices. See here and here.

ibizaman commented 11 years ago

Done with and 1adca0e