MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / EnableCBuffers

Method EnableCBuffers

GTE/Graphics/DX11/DX11Engine.cpp:924–946  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

922}
923
924void DX11Engine::EnableCBuffers(Shader const* shader, DX11Shader* dxShader)
925{
926 int32_t const index = ConstantBuffer::shaderDataLookup;
927 for (auto const& cb : shader->GetData(index))
928 {
929 if (cb.object)
930 {
931 DX11ConstantBuffer* dxCB = static_cast<DX11ConstantBuffer*>(Bind(cb.object));
932 if (dxCB)
933 {
934 dxShader->EnableCBuffer(mImmediate, cb.bindPoint, dxCB->GetDXBuffer());
935 }
936 else
937 {
938 LogError("Failed to bind constant buffer.");
939 }
940 }
941 else
942 {
943 LogError(cb.name + " is null constant buffer.");
944 }
945 }
946}
947
948void DX11Engine::DisableCBuffers(Shader const* shader, DX11Shader* dxShader)
949{

Callers

nothing calls this directly

Calls 3

GetDXBufferMethod · 0.80
GetDataMethod · 0.45
EnableCBufferMethod · 0.45

Tested by

no test coverage detected