Voici ma déclaration de vertex :
class CTLVertex
{
public:
float x;
float y;
float z;
float rhw;
int color;
int specular;
float tu;
float tv;
};
Pour le dessiner en Direct3D, je déclare mon FVF en :
D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | D3DFVF_TEX1;
Et ca marche très bien.
Par contre, en OpenGL, je n´arrive pas à trouver comment utiliser la composente spéculaire, je fais ceci :
Code:
CTLVertex* pVertex = Ma liste de vertex;
glEnableClientState( GL_COLOR_ARRAY ) ;
glVertexPointer( 4, GL_FLOAT, sizeof( CTLVertex ) , & [StartVertex].x ) ;
glColorPointer( 4, GL_UNSIGNED_BYTE, sizeof( CTLVertex ) , &[StartVertex].color ) ;
glTexCoordPointer( 2, GL_FLOAT, sizeof( CTLVertex ) , &[StartVertex].tu ) ;
Seulement, je n´ai pas trouvé de fonction genre glSpecularPointer() pour utiliser ma composante spéculaire.
Voila, donc si quelqu´un aurait une solution à me proposer, j´en serai ravi
Dino
http://www.zythum-project.com