Welcome, Guest. Please login or register.

Author Topic: Warp3D tutorials  (Read 5106 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline woof

  • Jr. Member
  • **
  • Join Date: Feb 2003
  • Posts: 94
    • Show all replies
    • http://uae.is.free.fr
Re: Warp3D tutorials
« on: April 13, 2012, 09:37:57 AM »
Hello
have a look to
http://aminet.net/dev/src/StarshipW3D.lha

replace  StarShipW3D.h with a simple textured square object like that

/* This file contain all the datas for the 3D-object */
/* All points    : a point    is defined as 5 coordinates U V X Y Z */
/* All triangles : a triangle is defined as 3 indices to the points */

#define TEXNAME "StarShip_256X256X24.RAW"
#define TEXSIZE 256

#define pointsCount 4
#define trianglesCount 2
float points[pointsCount*5] = {
   0.00 0.00 0.0 1.0 0.0    
   0.99 0.00 1.0 0.0 0.0
   0.99 0.99 1.0 1.0 0.0
   0.00 0.99 0.0 1.0 0.0
        };
ULONG indices[trianglesCount*3] = {
        0,1,2,
        0,2,3
};

Alain