Condividi tramite


D3DFVF_TEXCOORDSIZEN

Costruisce modelli di bit usati per identificare i formati di coordinate della trama all'interno di una descrizione FVF. I risultati di queste macro possono essere combinati all'interno di una descrizione FVF usando l'operatore OR.

#define D3DFVF_TEXCOORDSIZEN(CoordIndex) 
#define D3DFVF_TEXCOORDSIZE1(CoordIndex) (D3DFVF_TEXTUREFORMAT1 << (CoordIndex*2 + 16)) 
#define D3DFVF_TEXCOORDSIZE2(CoordIndex) (D3DFVF_TEXTUREFORMAT2) 
#define D3DFVF_TEXCOORDSIZE3(CoordIndex) (D3DFVF_TEXTUREFORMAT3 << (CoordIndex*2 + 16)) 
#define D3DFVF_TEXCOORDSIZE4(CoordIndex) (D3DFVF_TEXTUREFORMAT4 << (CoordIndex*2 + 16))

Parametri

Parametro Descrizione
CoordIndex
Valore che identifica il set di coordinate della trama in corrispondenza del quale si applicano le dimensioni della coordinata della trama (1-, 2-, 3-o 4Dimensionale).

 

Commenti

Le macro D3DFVF_TEXCOORDSIZEN usano le costanti seguenti.

#define D3DFVF_TEXTUREFORMAT1 3 // one floating point value
#define D3DFVF_TEXTUREFORMAT2 0 // two floating point values
#define D3DFVF_TEXTUREFORMAT3 1 // three floating point values
#define D3DFVF_TEXTUREFORMAT4 2 // four floating point values

La descrizione FVF seguente identifica un formato di vertice che ha una posizione; normale; colori diffusi e speculari; e due set di coordinate di trama. Il primo set di coordinate della trama include un singolo elemento e il secondo set include due elementi:

DWORD dwFVF = D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE |
              D3DFVF_SPECULAR | D3DFVF_TEX2 |
              D3DFVF_TEXCOORDSIZE1(0) |  // Uses 1D texture coordinates for
                                         // texture coordinate set 1 (index 0).
              D3DFVF_TEXCOORDSIZE2(1);   // And 2D texture coordinates for 
                                         // texture coordinate set 2 (index 1).

Requisiti

Requisito Valore
Intestazione
D3d9types.h

Vedi anche

Macro

D3DFVF