游戏开发论坛

 找回密码
 立即注册
搜索
查看: 4100|回复: 3

SetVertexShader这个函数在DX8.1中和DX9.0中用法不一样的

[复制链接]

11

主题

274

帖子

669

积分

高级会员

Rank: 4

积分
669
发表于 2003-12-31 22:43:00 | 显示全部楼层 |阅读模式
IDirect3DDevice8::SetVertexShader
Sets the current vertex shader to a previously created vertex shader or to a flexible vertex format (FVF) fixed function shader.

HRESULT SetVertexShader(
  DWORD Handle
);

Parameters
Handle
[in] Handle to a vertex shader, specifying the vertex shader to set. The value for this parameter can be the handle returned by IDirect3DDevice8::CreateVertexShader, or an FVF code. An FVF code is a combination of Flexible Vertex Format Flags.

11

主题

274

帖子

669

积分

高级会员

Rank: 4

积分
669
 楼主| 发表于 2003-12-31 22:47:00 | 显示全部楼层

Re:SetVertexShader这个函数在DX8.1中和DX9.0中用法不一样的

IDirect3DDevice9::SetVertexShader Method

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

Sets the vertex shader.

Syntax

HRESULT SetVertexShader(          IDirect3DVertexShader9* pShader
);
Parameters

pShader
[in] Vertex shader interface. For more information, see IDirect3DVertexShader9.


这是在DX9.0中的解释,他们后面的参数不一样,那位大侠可否告知他们的用法和解释。

18

主题

573

帖子

573

积分

高级会员

Rank: 4

积分
573
发表于 2004-1-1 00:19:00 | 显示全部楼层

Re:SetVertexShader这个函数在DX8.1中和DX9.0中用法不一样的

在DX8里,这个函数是统一设置FVF和VS的,但是在DX9中微软改变了做法,用SetVertexShader设置VS,用SetFVF设置原来的FVF,所以才会造成这样的结果。所以呢,要是使用原来的FVF编写程序,用SetFVF,用VS写程序,用SetVertexShader,看看DX9SDK Direct3D的前言,即What‘s New,就知道了。

11

主题

274

帖子

669

积分

高级会员

Rank: 4

积分
669
 楼主| 发表于 2004-1-1 20:53:00 | 显示全部楼层

Re:SetVertexShader这个函数在DX8.1中和DX9.0中用法不一样的

哦,是这样的,谢谢你 william9527 !!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2025-2-24 21:27

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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