Hello!
I have tried to phrase my question in multiple ways, mostly because I don't think I understand the complexity of this particular topic, so thanks for your patience!
Yet another rephrase:
1. Can I write Vertex Data to the VertexBuffer for two different objects, (square, triangle), with either the same or different input layout?
2. Can they both use different vertex shaders, pixel shaders, and textures?
3. Could I write a sort of Shader Selector in HLSL that reads a parameter from the input element and dynamically chooses a different pixel shader or texture?
Related C++ Code
When I create an input layout, can I do this without specifying an actual Vertex Shader, or somehow specify more than one?
NS::ThrowIfFailed(
result = NS::DeviceManager::Device->CreateInputLayout(
NS::ModelRenderer::InitialElementDescription,
2,
vertexShaderFile->Data,
vertexShaderFile->Length,
& NS::ModelRenderer::StaticInputLayout
)
);
When I set the VertexShader and PixelShader, how do I associate them with a particular model in my VertexBuffer? Is it possible to set more than one of each?
?
DeviceManager::DeviceContext->IASetInputLayout(ModelRenderer::StaticInputLayout.Get());
DeviceManager::DeviceContext->VSSetShader(ModelRenderer::StaticVertexShader.Get(), nullptr, 0);
DeviceManager::DeviceContext->PSSetShader(ModelRenderer::StaticPixelShader.Get(), nullptr, 0);