change grid shader primitive to line from triangle
This commit is contained in:
+7
-16
@@ -932,25 +932,12 @@ bool renderer_init(SDL_Window *window_) {
|
||||
.entryPoint = { .data = "main_vertex", .length = WGPU_STRLEN },
|
||||
.constantCount = 0,
|
||||
.constants = NULL,
|
||||
.bufferCount = 1,
|
||||
.buffers = (WGPUVertexBufferLayout[]){
|
||||
{
|
||||
.stepMode = WGPUVertexStepMode_Vertex,
|
||||
.arrayStride = 20,
|
||||
.attributeCount = 1,
|
||||
.attributes = (WGPUVertexAttribute[]){
|
||||
{
|
||||
.format = WGPUVertexFormat_Float32x3,
|
||||
.offset = 0,
|
||||
.shaderLocation = 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
.bufferCount = 0,
|
||||
.buffers = NULL,
|
||||
},
|
||||
|
||||
.primitive = {
|
||||
.topology = WGPUPrimitiveTopology_TriangleList,
|
||||
.topology = WGPUPrimitiveTopology_LineList,
|
||||
.stripIndexFormat = WGPUIndexFormat_Undefined,
|
||||
.frontFace = WGPUFrontFace_CCW,
|
||||
.cullMode = WGPUCullMode_Back,
|
||||
@@ -978,6 +965,10 @@ bool renderer_init(SDL_Window *window_) {
|
||||
wgpuShaderModuleRelease(shader);
|
||||
}
|
||||
|
||||
for (int i = 0; i < R_SHADER_COUNT; i++) {
|
||||
SDL_assert(shaders[i]);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user