File tree Expand file tree Collapse file tree 8 files changed +15
-15
lines changed
src/Cpp/1-getting-started
1-3-3-SettingUp3DRendering Expand file tree Collapse file tree 8 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,12 @@ ShaderCollection ShaderCollection::CreateShaderCollection(const ShaderCollection
4646 return collection;
4747}
4848
49- size_t ShaderCollection::GetLayoutByteSize (VertexType vertexType)
49+ UINT ShaderCollection::GetLayoutByteSize (VertexType vertexType)
5050{
5151 switch (vertexType)
5252 {
5353 case VertexType::PositionColor:
54- return sizeof (VertexPositionColor);
54+ return static_cast <UINT>( sizeof (VertexPositionColor) );
5555 }
5656 return 0 ;
5757}
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class ShaderCollection
2020
2121 static ShaderCollection CreateShaderCollection (
2222 const ShaderCollectionDescriptor& settings, ID3D11Device* device);
23- static size_t GetLayoutByteSize (VertexType vertexType);
23+ static UINT GetLayoutByteSize (VertexType vertexType);
2424
2525 void ApplyToContext (ID3D11DeviceContext* context);
2626 void Destroy ();
Original file line number Diff line number Diff line change @@ -80,14 +80,14 @@ ShaderCollection ShaderCollection::CreateShaderCollection(const ShaderCollection
8080 return collection;
8181}
8282
83- size_t ShaderCollection::GetLayoutByteSize (VertexType vertexType)
83+ UINT ShaderCollection::GetLayoutByteSize (VertexType vertexType)
8484{
8585 switch (vertexType)
8686 {
8787 case VertexType::PositionColor:
88- return sizeof (VertexPositionColor);
88+ return static_cast <UINT>( sizeof (VertexPositionColor) );
8989 case VertexType::PositionColorUv:
90- return sizeof (VertexPositionColorUv);
90+ return static_cast <UINT>( sizeof (VertexPositionColorUv) );
9191 }
9292 return 0 ;
9393}
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class ShaderCollection
2020
2121 static ShaderCollection CreateShaderCollection (
2222 const ShaderCollectionDescriptor& settings, ID3D11Device* device);
23- static size_t GetLayoutByteSize (VertexType vertexType);
23+ static UINT GetLayoutByteSize (VertexType vertexType);
2424
2525 void ApplyToContext (ID3D11DeviceContext* context);
2626 void Destroy ();
Original file line number Diff line number Diff line change @@ -80,14 +80,14 @@ ShaderCollection ShaderCollection::CreateShaderCollection(const ShaderCollection
8080 return collection;
8181}
8282
83- size_t ShaderCollection::GetLayoutByteSize (VertexType vertexType)
83+ UINT ShaderCollection::GetLayoutByteSize (VertexType vertexType)
8484{
8585 switch (vertexType)
8686 {
8787 case VertexType::PositionColor:
88- return sizeof (VertexPositionColor);
88+ return static_cast <UINT>( sizeof (VertexPositionColor) );
8989 case VertexType::PositionColorUv:
90- return sizeof (VertexPositionColorUv);
90+ return static_cast <UINT>( sizeof (VertexPositionColorUv) );
9191 }
9292 return 0 ;
9393}
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ class ShaderCollection
2121 static ShaderCollection CreateShaderCollection (
2222 const ShaderCollectionDescriptor& settings, ID3D11Device* device);
2323
24- static size_t GetLayoutByteSize (VertexType vertexType);
24+ static UINT GetLayoutByteSize (VertexType vertexType);
2525
2626 void ApplyToContext (ID3D11DeviceContext* context);
2727 void Destroy ();
Original file line number Diff line number Diff line change @@ -80,14 +80,14 @@ ShaderCollection ShaderCollection::CreateShaderCollection(const ShaderCollection
8080 return collection;
8181}
8282
83- size_t ShaderCollection::GetLayoutByteSize (VertexType vertexType)
83+ UINT ShaderCollection::GetLayoutByteSize (VertexType vertexType)
8484{
8585 switch (vertexType)
8686 {
8787 case VertexType::PositionColor:
88- return sizeof (VertexPositionColor);
88+ return static_cast <UINT>( sizeof (VertexPositionColor) );
8989 case VertexType::PositionColorUv:
90- return sizeof (VertexPositionColorUv);
90+ return static_cast <UINT>( sizeof (VertexPositionColorUv) );
9191 }
9292 return 0 ;
9393}
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class ShaderCollection
2020
2121 static ShaderCollection CreateShaderCollection (
2222 const ShaderCollectionDescriptor& settings, ID3D11Device* device);
23- static size_t GetLayoutByteSize (VertexType vertexType);
23+ static UINT GetLayoutByteSize (VertexType vertexType);
2424
2525 void ApplyToContext (ID3D11DeviceContext* context);
2626 void Destroy ();
You can’t perform that action at this time.
0 commit comments