本文整理汇总了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;
}
示例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);
}
示例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);
}