游戏开发论坛

 找回密码
 立即注册
搜索
查看: 1124|回复: 1

Draw2D or Draw3D

[复制链接]

414

主题

611

帖子

621

积分

高级会员

Rank: 4

积分
621
发表于 2005-11-5 22:52:00 | 显示全部楼层 |阅读模式
我找到????例,???一下若以2D的??虻脑?,哪一??程式比?好,?槭颤N?
Draw2Dzip,Draw3D.zip哪一??比??合2D??蚰?

http://www.vchelp.net/cndevforum/subject_view.asp?subject_id=160388&forum_id=28

//Draw2D

// The 2-D vertex format and descriptor
typedef struct {
  FLOAT x, y, z;     // 2-D coordinates
  FLOAT rhw;         // rhw
  FLOAT u, v;        // Texture coordinates
} sVertex;
#define VERTEXFVF (D3DFVF_XYZRHW | D3DFVF_TEX1)


//Draw3D

// The 3-D vertex format and descriptor
typedef struct {
  FLOAT x, y, z;     // 3-D coordinates
  FLOAT u, v;        // Texture coordinates
} sVertex;
#define VERTEXFVF (D3DFVF_XYZ | D3DFVF_TEX1)


5

主题

41

帖子

41

积分

注册会员

Rank: 2

积分
41
发表于 2005-11-6 01:44:00 | 显示全部楼层

Re:Draw2D or Draw3D

一般做2D的这样定义的比较多:
#define VERTEXFVF (D3DFVF_XYZ|D3DFVF_DIFFUSE|D3DFVF_TEX1)
struct CUSTOMVERTEX
{
float x, y, z;
DWORD color;
float tu, tv;       
};
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2026-1-22 13:29

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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