An Introduction to Texture Mapping in Direct3D
with Examples in C++ |
Prof. David Bernstein
|
Computer Science Department |
bernstdh@jmu.edu |
struct
:
float
values for the texture
coordinates \(u\) and \(v\)
D3DFVF_TEX1
HRESULT D3DXCreateTextureFromFile(LPDIRECT3DDEVICE9 device, LPCTSTR sourceFile, LPDIRECT3DTEXTURE9* texture)
IDirect3DTexture9
interface
HRESULT IDirect3DDevice9::SetTexture(DWORD sampler, IDirect3DBaseTexture9* texture)
HRESULT IDirect3DDevice9::SetTextureStageState(DWORD stage, D3DTEXTURESTAGESTATETYPE name, DWORD value)
name
:
D3DTSS_COLOROP
,D3DTSS_COLORARG1
,
D3DTSS_COLORARG2
,D3DTSS_ALPHAOP
,
D3DTSS_ALPHAARG1
,D3DTSS_ALPHAARG2
,
D3DTSS_BUMPENVMAT00
,D3DTSS_BUMPENVMAT01
,
D3DTSS_BUMPENVMAT10
,D3DTSS_BUMPENVMAT11
,
D3DTSS_TEXCOORDINDEX
,D3DTSS_BUMPENVLSCALE
,
D3DTSS_BUMPENVLOFFSET
,
D3DTSS_TEXTURETRANSFORMFLAGS
,
D3DTSS_COLORARG0
,D3DTSS_ALPHAARG0
,
D3DTSS_RESULTARG
,D3DTSS_CONSTANT
,
D3DTSS_FORCE_DWORD