summaryrefslogtreecommitdiffstats
path: root/examples/model-viewer/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/model-viewer/main.cpp')
-rw-r--r--examples/model-viewer/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/model-viewer/main.cpp b/examples/model-viewer/main.cpp
index 6e21f9050..76b8fca05 100644
--- a/examples/model-viewer/main.cpp
+++ b/examples/model-viewer/main.cpp
@@ -744,9 +744,9 @@ Result initialize()
SLANG_RETURN_ON_FAIL(context.init(gDevice));
InputElementDesc inputElements[] = {
- {"POSITION", 0, Format::RGB_Float32, offsetof(Model::Vertex, position) },
- {"NORMAL", 0, Format::RGB_Float32, offsetof(Model::Vertex, normal) },
- {"UV", 0, Format::RG_Float32, offsetof(Model::Vertex, uv) },
+ {"POSITION", 0, Format::R32G32B32_FLOAT, offsetof(Model::Vertex, position) },
+ {"NORMAL", 0, Format::R32G32B32_FLOAT, offsetof(Model::Vertex, normal) },
+ {"UV", 0, Format::R32G32_FLOAT, offsetof(Model::Vertex, uv) },
};
auto inputLayout = gDevice->createInputLayout(
&inputElements[0],
@@ -870,7 +870,7 @@ void renderFrame(int frameIndex) override
for(auto& model : gModels)
{
drawCommandEncoder->setVertexBuffer(0, model->vertexBuffer, sizeof(Model::Vertex));
- drawCommandEncoder->setIndexBuffer(model->indexBuffer, Format::R_UInt32);
+ drawCommandEncoder->setIndexBuffer(model->indexBuffer, Format::R32_UINT);
// For each model we provide a parameter
// block that holds the per-model transformation
// parameters, corresponding to the `PerModel` type