fvf format

bebou007 Message lu Posté le 13 Mar 2011 à 17:19 Bulle
Avatar de bebou007
Explorateur

Messages : 238
GCPoints : 43228
salut a tous voila j'ai beaux cherche même sur le forum anglais dbpro je trouve rien

j'aurais voulu avoir plus d'info sur le fvf format par Default en aide de la commande make mesh from memblock il dise le 338 mais a quoi correspond cette valeur? ou peut on trouver les autres format?

pour info le format 338 c'est

-3 float x,y,z
-3 float normale x,y,z
-1 dword pour la couleur
-2 float pour la texture


[edit j'ai trouver]

bon j'ai finalement trouver sur le fofo anglais sa servira peut être a quelq'un d'autre donc je poste ici

Spoiler - Cliquez pour afficher
FVF_XYZ 0x002
3 FLOATS containing x,y,z position of the vertex
FVF_XYZRHW 0x004
I think this contains screen coordinates
FVF_XYZB1 0x006
FVF_XYZB2 0x008
FVF_XYZB3 0x00a
FVF_XYZB4 0x00c
FVF_XYZB5 0x00e
FVF_NORMAL 0x010
3 FLOATS containing x,y,z position of the normal
FVF_PSIZE 0x020
FVF_DIFFUSE 0x040
1 FLOAT containing the color value of the vertex (in rgba format? 0xffffff turns out baby blue)
FVF_SPECULAR 0x080
1 FLOAT containing the color value of the vertex's specular (not sure though)
FVF_TEX0 0x000
FVF_TEX1 0x100
2 FLOATS containing the u and v position of vertex
FVF_TEX2 0x200
2 FLOATS containing the u and v position of vertex
FVF_TEX3 0x300
2 FLOATS containing the u and v position of vertex
FVF_TEX4 0x400
2 FLOATS containing the u and v position of vertex
FVF_TEX5 0x500
2 FLOATS containing the u and v position of vertex
FVF_TEX6 0x600
2 FLOATS containing the u and v position of vertex
FVF_TEX7 0x700
2 FLOATS containing the u and v position of vertex
FVF_TEX8 0x800
2 FLOATS containing the u and v position of vertex


donc il suffit additionner les valeur hexa selon le format voulu

exemple pour le format "338"

-3 float x,y,z -------------->0x002
-3 float normale x,y,z ------>0x010
-1 dword pour la couleur ---->0x040
-2 float pour la texture ---->0x100

0x002 + 0x010 + 0x040 + 0x100 = 152 hexadecimale => decimale "338"





Répondre
GameCorp - Site d'apprentissage et d'entraide à la création de jeux vidéo.
XHTML Valid 1.1 - Page générée en 0.0214 secondes