游戏开发论坛

 找回密码
 立即注册
搜索
查看: 2247|回复: 2

怎么在D3D下画个2D矩形?用什么函数?

[复制链接]

22

主题

132

帖子

134

积分

注册会员

Rank: 2

积分
134
发表于 2005-3-8 12:02:00 | 显示全部楼层 |阅读模式
怎么在D3D下画个2D矩形?用什么函数?画直线我会,但不知道画矩形,请高手指点!

85

主题

824

帖子

878

积分

高级会员

Rank: 4

积分
878
QQ
发表于 2005-3-8 12:11:00 | 显示全部楼层

Re:怎么在D3D下画个2D矩形?用什么函数?

拼三角形就是了

15

主题

1268

帖子

1268

积分

金牌会员

Rank: 6Rank: 6

积分
1268
发表于 2005-3-8 18:33:00 | 显示全部楼层

Re:怎么在D3D下画个2D矩形?用什么函数?

用Dx9B(2002。12):
ID3DXSprite Interface

--------------------------------------------------------------------------------

The ID3DXSprite interface provides a set of methods that simplify the process of drawing sprites using Microsoft® Direct3D®.

ID3DXSprite Members

Begin Prepares a device for drawing sprites.
Draw Draws a simple sprite in screen space.
DrawTransform Provides a mechanism for drawing a sprite that is transformed by a specified matrix.
End Restores the device state to how it was when ID3DXSprite::Begin was called.
GetDevice Retrieves the Direct3D device associated with the sprite object.
OnLostDevice Releases all references to video memory resources and deletes all stateblocks.

OnResetDevice Should be called after the device has been reset.

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2025-12-24 18:38

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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