Skip to content

Commit 60f08fb

Browse files
committed
Fixed read/write of depthBiasConstantFactor added a version check to retain readablility of older files.
Update ShaderSets.
1 parent 64b0bf6 commit 60f08fb

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

src/vsg/state/RasterizationState.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ void RasterizationState::read(Input& input)
5858
input.readValue<uint32_t>("cullMode", cullMode);
5959
input.readValue<uint32_t>("frontFace", frontFace);
6060
input.readValue<uint32_t>("depthBiasEnable", depthBiasEnable);
61-
input.readValue<uint32_t>("depthBiasConstantFactor", depthBiasConstantFactor);
61+
62+
if (input.version_greater_equal(1, 1, 11)) input.read("depthBiasConstantFactor", depthBiasConstantFactor);
63+
else input.readValue<uint32_t>("depthBiasConstantFactor", depthBiasConstantFactor);
64+
6265
input.read("depthBiasClamp", depthBiasClamp);
6366
input.read("depthBiasSlopeFactor", depthBiasSlopeFactor);
6467
input.read("lineWidth", lineWidth);
@@ -74,7 +77,10 @@ void RasterizationState::write(Output& output) const
7477
output.writeValue<uint32_t>("cullMode", cullMode);
7578
output.writeValue<uint32_t>("frontFace", frontFace);
7679
output.writeValue<uint32_t>("depthBiasEnable", depthBiasEnable);
77-
output.writeValue<uint32_t>("depthBiasConstantFactor", depthBiasConstantFactor);
80+
81+
if (output.version_greater_equal(1, 1, 11)) output.write("depthBiasConstantFactor", depthBiasConstantFactor);
82+
else output.writeValue<uint32_t>("depthBiasConstantFactor", depthBiasConstantFactor);
83+
7884
output.write("depthBiasClamp", depthBiasClamp);
7985
output.write("depthBiasSlopeFactor", depthBiasSlopeFactor);
8086
output.write("lineWidth", lineWidth);

src/vsg/text/shaders/text_ShaderSet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ static const uint8_t data[] = {
276276
0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 112, 99, 0, 0, 0, 0, 255, 255, 255, 127, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0,
277277
0, 0, 0, 0, 2, 0, 0, 0, 17, 0, 0, 0, 23, 0, 0, 0, 118, 115, 103, 58, 58, 82, 97, 115, 116, 101, 114, 105, 122, 97, 116, 105,
278278
111, 110, 83, 116, 97, 116, 101, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
279-
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 128, 63, 18, 0, 0, 0, 20,
279+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 128, 63, 18, 0, 0, 0, 20,
280280
0, 0, 0, 118, 115, 103, 58, 58, 67, 111, 108, 111, 114, 66, 108, 101, 110, 100, 83, 116, 97, 116, 101, 0, 0, 0, 0, 255, 255, 255, 255, 255,
281281
255, 255, 255, 3, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 6, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 1,
282282
0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4,

0 commit comments

Comments
 (0)