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
46
46
return collection;
47
47
}
48
48
49
- size_t ShaderCollection::GetLayoutByteSize (VertexType vertexType)
49
+ UINT ShaderCollection::GetLayoutByteSize (VertexType vertexType)
50
50
{
51
51
switch (vertexType)
52
52
{
53
53
case VertexType::PositionColor:
54
- return sizeof (VertexPositionColor);
54
+ return static_cast <UINT>( sizeof (VertexPositionColor) );
55
55
}
56
56
return 0 ;
57
57
}
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class ShaderCollection
20
20
21
21
static ShaderCollection CreateShaderCollection (
22
22
const ShaderCollectionDescriptor& settings, ID3D11Device* device);
23
- static size_t GetLayoutByteSize (VertexType vertexType);
23
+ static UINT GetLayoutByteSize (VertexType vertexType);
24
24
25
25
void ApplyToContext (ID3D11DeviceContext* context);
26
26
void Destroy ();
Original file line number Diff line number Diff line change @@ -80,14 +80,14 @@ ShaderCollection ShaderCollection::CreateShaderCollection(const ShaderCollection
80
80
return collection;
81
81
}
82
82
83
- size_t ShaderCollection::GetLayoutByteSize (VertexType vertexType)
83
+ UINT ShaderCollection::GetLayoutByteSize (VertexType vertexType)
84
84
{
85
85
switch (vertexType)
86
86
{
87
87
case VertexType::PositionColor:
88
- return sizeof (VertexPositionColor);
88
+ return static_cast <UINT>( sizeof (VertexPositionColor) );
89
89
case VertexType::PositionColorUv:
90
- return sizeof (VertexPositionColorUv);
90
+ return static_cast <UINT>( sizeof (VertexPositionColorUv) );
91
91
}
92
92
return 0 ;
93
93
}
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class ShaderCollection
20
20
21
21
static ShaderCollection CreateShaderCollection (
22
22
const ShaderCollectionDescriptor& settings, ID3D11Device* device);
23
- static size_t GetLayoutByteSize (VertexType vertexType);
23
+ static UINT GetLayoutByteSize (VertexType vertexType);
24
24
25
25
void ApplyToContext (ID3D11DeviceContext* context);
26
26
void Destroy ();
Original file line number Diff line number Diff line change @@ -80,14 +80,14 @@ ShaderCollection ShaderCollection::CreateShaderCollection(const ShaderCollection
80
80
return collection;
81
81
}
82
82
83
- size_t ShaderCollection::GetLayoutByteSize (VertexType vertexType)
83
+ UINT ShaderCollection::GetLayoutByteSize (VertexType vertexType)
84
84
{
85
85
switch (vertexType)
86
86
{
87
87
case VertexType::PositionColor:
88
- return sizeof (VertexPositionColor);
88
+ return static_cast <UINT>( sizeof (VertexPositionColor) );
89
89
case VertexType::PositionColorUv:
90
- return sizeof (VertexPositionColorUv);
90
+ return static_cast <UINT>( sizeof (VertexPositionColorUv) );
91
91
}
92
92
return 0 ;
93
93
}
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ class ShaderCollection
21
21
static ShaderCollection CreateShaderCollection (
22
22
const ShaderCollectionDescriptor& settings, ID3D11Device* device);
23
23
24
- static size_t GetLayoutByteSize (VertexType vertexType);
24
+ static UINT GetLayoutByteSize (VertexType vertexType);
25
25
26
26
void ApplyToContext (ID3D11DeviceContext* context);
27
27
void Destroy ();
Original file line number Diff line number Diff line change @@ -80,14 +80,14 @@ ShaderCollection ShaderCollection::CreateShaderCollection(const ShaderCollection
80
80
return collection;
81
81
}
82
82
83
- size_t ShaderCollection::GetLayoutByteSize (VertexType vertexType)
83
+ UINT ShaderCollection::GetLayoutByteSize (VertexType vertexType)
84
84
{
85
85
switch (vertexType)
86
86
{
87
87
case VertexType::PositionColor:
88
- return sizeof (VertexPositionColor);
88
+ return static_cast <UINT>( sizeof (VertexPositionColor) );
89
89
case VertexType::PositionColorUv:
90
- return sizeof (VertexPositionColorUv);
90
+ return static_cast <UINT>( sizeof (VertexPositionColorUv) );
91
91
}
92
92
return 0 ;
93
93
}
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class ShaderCollection
20
20
21
21
static ShaderCollection CreateShaderCollection (
22
22
const ShaderCollectionDescriptor& settings, ID3D11Device* device);
23
- static size_t GetLayoutByteSize (VertexType vertexType);
23
+ static UINT GetLayoutByteSize (VertexType vertexType);
24
24
25
25
void ApplyToContext (ID3D11DeviceContext* context);
26
26
void Destroy ();
You can’t perform that action at this time.
0 commit comments