当前位置: 首页>>代码示例>>C++>>正文


C++ ConstantBuffer::InitBuffer方法代码示例

本文整理汇总了C++中ConstantBuffer::InitBuffer方法的典型用法代码示例。如果您正苦于以下问题:C++ ConstantBuffer::InitBuffer方法的具体用法?C++ ConstantBuffer::InitBuffer怎么用?C++ ConstantBuffer::InitBuffer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ConstantBuffer的用法示例。


在下文中一共展示了ConstantBuffer::InitBuffer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Init

void ParticleSystemEffectBinder::Init(DeviceDependableFactory * factory)
{
	colorTexture = TexturePtr(true);
	dataBuffer = factory->CreateConstantBuffer();
	ConstantBuffer * b = dataBuffer.Get();

	b->InitBuffer(sizeof(ParticleGPUData) * MAX_PARTICLES_IN_SYSTEM);

	cameraVectorsBuffer = factory->CreateConstantBuffer();
	b = cameraVectorsBuffer.Get();

	b->InitBuffer(sizeof(CameraVectorsChunck));
	camVectorsChunck.padding1 = 0;
	camVectorsChunck.padding2 = 0;

}
开发者ID:dgi09,项目名称:3DRenderingEngine,代码行数:16,代码来源:ParticleSystemEffectBinder.cpp

示例2: Init

void SceneShaderData::Init(DeviceDependableFactory * factory)
{
	cameraPtr = factory->CreateConstantBuffer();
	globalAmbiantPtr = factory->CreateConstantBuffer();
	illuminationInfoPtr = factory->CreateConstantBuffer();
	directionLightsPtr = factory->CreateConstantBuffer();
	pointLightsPtr = factory->CreateConstantBuffer();

	ConstantBuffer * buffer = cameraPtr.Get();
	buffer->InitBuffer(sizeof(CameraData));

	buffer = globalAmbiantPtr.Get();
	buffer->InitBuffer(sizeof(Vector4));

	buffer = illuminationInfoPtr.Get();
	buffer->InitBuffer(sizeof(IlluminationInfo));

	buffer = directionLightsPtr.Get();
	buffer->InitBuffer(sizeof(DLData) * MAX_DIRECTIONAL_LIGHTS);

	buffer = pointLightsPtr.Get();
	buffer->InitBuffer(sizeof(PLData) * MAX_POINT_LIGHTS);
}
开发者ID:dgi09,项目名称:3DRenderingEngine,代码行数:23,代码来源:SceneShaderData.cpp

示例3: Init

void AnimatedEntity::Init(ModelHandler model,SkeletonHandler skeleton,ResourceManager * resMgr, DeviceDependableFactory * factory)
{
	EntityBase::Init(model,resMgr, factory);

	this->skeletonHandler = skeleton;


	palleteBuffer = factory->CreateConstantBuffer();
	ConstantBuffer * buffer = palleteBuffer.Get();
	buffer->InitBuffer(sizeof(DirectX::XMFLOAT4X4) * MAX_BONES);

	currentAnimController = nullptr;

	DirectX::XMFLOAT4X4 id;
	DirectX::XMStoreFloat4x4(&id,DirectX::XMMatrixIdentity());
	FillBindPosePallete(0,id);

	EffectMaskUtil::Bind(effectMask,SKINNING);
}
开发者ID:dgi09,项目名称:3DRenderingEngine,代码行数:19,代码来源:AnimatedEntity.cpp


注:本文中的ConstantBuffer::InitBuffer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。