游戏开发论坛

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

对DX11不是很熟悉,看到这样用cbuffer,我的问题是能不能

[复制链接]

9

主题

21

帖子

167

积分

注册会员

Rank: 2

积分
167
发表于 2012-9-10 15:13:00 | 显示全部楼层 |阅读模式
对DX11不是很熟悉,看到这样用cbuffer,我的问题是能不能不用register?不用register要怎么实现?

g_pImmediateContext->UpdateSubresource( g_pConstantBuffer, 0, NULL, &cb, 0, 0 );
g_pImmediateContext->VSSetConstantBuffers( 0, 1, &g_pConstantBuffer );

cbuffer ConstantBuffer : register( b0 )
{
        matrix World;
        matrix View;
        matrix Projection;
}

0

主题

398

帖子

577

积分

高级会员

Rank: 4

积分
577
发表于 2012-9-11 15:56:00 | 显示全部楼层

Re:对DX11不是很熟悉,看到这样用cbuffer,我的问题是能不

可以用cbuffer的名字来得到register....

要多看文档....
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2025-7-27 05:41

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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