游戏开发论坛

 找回密码
 立即注册
搜索
查看: 3566|回复: 5

ID3DXSprite::Draw书上说有5个参数,DX9.0SDK上有7个参数,两者

[复制链接]

106

主题

743

帖子

745

积分

高级会员

Rank: 4

积分
745
QQ
发表于 2008-1-30 22:06:00 | 显示全部楼层 |阅读模式
ID3DXSprite:raw书上说有5个参数,DX9.0SDK上有7个参数,两者有什么区别?

35

主题

1735

帖子

1739

积分

金牌会员

Rank: 6Rank: 6

积分
1739
QQ
发表于 2008-1-30 22:14:00 | 显示全部楼层

Re:ID3DXSprite::Draw书上说有5个参数,DX9.0SDK上有7个参数,两

为何参数不一样多?难道是SDK版本不同吗?

106

主题

743

帖子

745

积分

高级会员

Rank: 4

积分
745
QQ
 楼主| 发表于 2008-1-30 22:27:00 | 显示全部楼层

Re:ID3DXSprite::Draw书上说有5个参数,DX9.0SDK上有7个参数,两

不清楚,5个参数的能用,7个的不能编译。
HRESULT Draw(          LPDIRECT3DTEXTURE9 pSrcTexture,
    CONST RECT *pSrcRect,
    CONST D3DXVECTOR2 *pScaling,
    CONST D3DXVECTOR2 *pRotationCenter,
    FLOAT Rotation,
    CONST D3DVECTOR2 *pTranslation,
    D3DCOLOR Color
);
pSrcTexture
[in] Pointer to an IDirect3DTexture9 interface, representing the source image used for the sprite.
pSrcRect
[in] Pointer to a RECT structure that indicates what portion of the source texture to use for the sprite. If this parameter is NULL, then the entire source image is used for the sprite; however, you can specify a subrectangle of the source image instead. Before transformation, the size of the sprite is defined by pSrcRect with the upper left corner at the origin (0,0).
pScaling
[in] Pointer to a D3DXVECTOR2 structure, containing the scaling vector. If this parameter is NULL, the value (1.0, 1.0) is used. Since pScaling is vector, a multiplier of 1.0 would preserve the source image size.
pRotationCenter
[in] Pointer to a D3DXVECTOR2 structure, containing the point in screen pixels that identifies the center of rotation. If this argument is NULL, the point (0,0) is used, which is the upper-left corner of the texture.
Rotation
[in] Value that specifies the rotation in radians, counterclockwise.
pTranslation
[in] Pointer to a D3DXVECTOR2 structure, containing the translation in screen pixels. If this argument is NULL, the point (0,0) is used.
Color
[in] D3DCOLOR type. The color and alpha channels are modulated by this value. A value of 0xFFFFFFFF maintains the original source color and alpha data.

66

主题

223

帖子

223

积分

中级会员

Rank: 3Rank: 3

积分
223
发表于 2008-1-30 23:38:00 | 显示全部楼层

Re:ID3DXSprite::Draw书上说有5个参数,DX9.0SDK上有7个参数,两

版本不一样吧,记得这个函数变化蛮大的

3

主题

121

帖子

121

积分

注册会员

Rank: 2

积分
121
QQ
发表于 2008-1-31 12:54:00 | 显示全部楼层

Re:ID3DXSprite::Draw书上说有5个参数,DX9.0SDK上有7个参数,两

5个参数的是9.0C以上, 7个是9.0B

106

主题

743

帖子

745

积分

高级会员

Rank: 4

积分
745
QQ
 楼主| 发表于 2008-1-31 18:10:00 | 显示全部楼层

Re:ID3DXSprite::Draw书上说有5个参数,DX9.0SDK上有7个参数,两

原来如此,多谢各位。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2025-12-19 23:38

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表