switch front faces to be CCW instead of CW
This commit is contained in:
+13
-13
@@ -113,9 +113,9 @@ struct Vertex {
|
||||
|
||||
static Vertex vertices[] = {
|
||||
{{ -0.5f, 0.5f }},
|
||||
{{ 0.5f, 0.5f }},
|
||||
{{ 0.5f, -0.5f }},
|
||||
{{ -0.5f, -0.5f }},
|
||||
{{ 0.5f, -0.5f }},
|
||||
{{ 0.5f, 0.5f }},
|
||||
};
|
||||
|
||||
static Uint16 indices[] = {
|
||||
@@ -127,27 +127,27 @@ static Uint16 indices[] = {
|
||||
static Vertex grid_vertices[] = {
|
||||
// LEFT
|
||||
{{ -0.5f, 0.5f }},
|
||||
{{ -0.5f + grid_line_size, 0.5f }},
|
||||
{{ -0.5f + grid_line_size, -0.5f + grid_line_size }},
|
||||
{{ -0.5f, -0.5f + grid_line_size }},
|
||||
{{ -0.5f + grid_line_size, -0.5f + grid_line_size }},
|
||||
{{ -0.5f + grid_line_size, 0.5f }},
|
||||
|
||||
// TOP
|
||||
{{ -0.5f + grid_line_size, 0.5f }},
|
||||
{{ 0.5f, 0.5f }},
|
||||
{{ 0.5f, 0.5f - grid_line_size }},
|
||||
{{ -0.5f + grid_line_size, 0.5f - grid_line_size }},
|
||||
{{ 0.5f, 0.5f - grid_line_size }},
|
||||
{{ 0.5f, 0.5f }},
|
||||
|
||||
// RIGHT
|
||||
{{ 0.5f - grid_line_size, 0.5f - grid_line_size }},
|
||||
{{ 0.5f, 0.5f - grid_line_size }},
|
||||
{{ 0.5f, -0.5f }},
|
||||
{{ 0.5f - grid_line_size, -0.5f }},
|
||||
{{ 0.5f, -0.5f }},
|
||||
{{ 0.5f, 0.5f - grid_line_size }},
|
||||
|
||||
// BOTTOM
|
||||
{{ -0.5f, -0.5f + grid_line_size }},
|
||||
{{ 0.5f - grid_line_size, -0.5f + grid_line_size }},
|
||||
{{ 0.5f - grid_line_size, -0.5f }},
|
||||
{{ -0.5f, -0.5f }},
|
||||
{{ 0.5f - grid_line_size, -0.5f }},
|
||||
{{ 0.5f - grid_line_size, -0.5f + grid_line_size }},
|
||||
};
|
||||
|
||||
static Uint16 grid_indices[] = {
|
||||
@@ -805,7 +805,7 @@ static bool recreate_graphics_pipelines() {
|
||||
.primitive = {
|
||||
.topology = WGPUPrimitiveTopology_TriangleList,
|
||||
.stripIndexFormat = WGPUIndexFormat_Undefined,
|
||||
.frontFace = WGPUFrontFace_CW,
|
||||
.frontFace = WGPUFrontFace_CCW,
|
||||
.cullMode = WGPUCullMode_Back,
|
||||
.unclippedDepth = false,
|
||||
},
|
||||
@@ -958,7 +958,7 @@ static bool recreate_graphics_pipelines() {
|
||||
.primitive = {
|
||||
.topology = WGPUPrimitiveTopology_TriangleList,
|
||||
.stripIndexFormat = WGPUIndexFormat_Undefined,
|
||||
.frontFace = WGPUFrontFace_CW,
|
||||
.frontFace = WGPUFrontFace_CCW,
|
||||
.cullMode = WGPUCullMode_Back,
|
||||
.unclippedDepth = false,
|
||||
},
|
||||
@@ -1051,7 +1051,7 @@ static bool recreate_graphics_pipelines() {
|
||||
.primitive = {
|
||||
.topology = WGPUPrimitiveTopology_TriangleList,
|
||||
.stripIndexFormat = WGPUIndexFormat_Undefined,
|
||||
.frontFace = WGPUFrontFace_CW,
|
||||
.frontFace = WGPUFrontFace_CCW,
|
||||
.cullMode = WGPUCullMode_Back,
|
||||
.unclippedDepth = false,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user