IDirect3DDevice9::SetTexture 方法

原文:Assigns a texture to a stage for a device.

译文:分配一个纹理到一个设备层

 

语法(Syntax)

HRESULT SetTexture(      

    DWORD Stage,     IDirect3DBaseTexture9 *pTexture );

参数(Parameters)

Stage
[in] Stage identifier to which the texture is set. Stage identifiers are zero-based. The maximum number of stages supported is determined from two caps: D3DCAPS.MaxSimultaneousTextureStages and D3DCAPS9.MaxTextureBlendingStages.

Displacement Mapping uses a special stage index, called D3DDDMAPSAMPLER.

Vertex Textures use a special stage index called D3DVERTEXTEXTURESAMPLER.

 

[in(用户给出参数的值)]标志要设置纹理的设备层,从0开始.支持的最大设备层数由两个标志决定:

D3DCAPS.MaxSimultaneousTextureStages 和 D3DCAPS9.MaxTextureBlendingStages.

位移映射 使用特殊的层索引,称为 D3DDDMAPSAMPLER

顶点文理 使用特殊的层索引,称为 D3DVERTEXTEXTURESAMPLER

pTexture
[in] Pointer to an IDirect3DBaseTexture9 interface, representing the texture being set.
 
IDirect3DBaseTexture9的指针,代表要设置的纹理

返回值(Return Value)

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be D3DERR_INVALIDCALL.

 

如果该方法成功,返回值是D3D_OK

如果该方法失败,返回值可能是D3DERR_INVALICALL

备注(Remarks)

IDirect3DDevice9::SetTexture is not allowed if the texture is created with a pool type of D3DPOOL_SCRATCH. IDirect3DDevice9::SetTexture is not allowed with a pool type of D3DPOOL_SYSTEMMEM texture unless DevCaps is set with D3DDEVCAPS_TEXTURESYSTEMMEMORY.

 

IDirect3DDevice9::SetTexture 不允许(调用)若文理是以D3DPOOL_SCRATCH类型池创建的话.

同样D3DPOOL_SYSTEMMEM池类型创建的纹理也不允许,除非DevCaps设置为D3DDEVCAPS_TEXTURESYSTEMMEMORY.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值