From 4664af5e2ccdb1e3f481e4956320cb5a4dbf9a92 Mon Sep 17 00:00:00 2001 From: Alessandro Mauri Date: Wed, 11 Mar 2026 17:22:52 +0100 Subject: [PATCH] update deprecations for c3 0.7.9 --- renderer.c3 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/renderer.c3 b/renderer.c3 index d0e448c..2105829 100644 --- a/renderer.c3 +++ b/renderer.c3 @@ -2,7 +2,7 @@ <* @require $defined((Type){}.id) : `No .id member found in the type` *> -module idlist{Type}; +module idlist; import std::collections::list; alias IdList = List{Type}; @@ -452,9 +452,9 @@ fn void Renderer.load_spirv_shader_from_file(&self, String name, String vert_pat // this describes what we want to draw, since for drawing different things we have to change // the GPUPrimitiveType and GPURasterizerState for the pipeline. enum PipelineType : (GPUPrimitiveType primitive_type, GPURasterizerState raster_state) { - RECT = {GPU_PRIMITIVETYPE_TRIANGLELIST, {.fill_mode = GPU_FILLMODE_FILL, .cull_mode = GPU_CULLMODE_NONE, .front_face = GPU_FRONTFACE_COUNTER_CLOCKWISE}}, - SPRITE = {GPU_PRIMITIVETYPE_TRIANGLELIST, {.fill_mode = GPU_FILLMODE_FILL, .cull_mode = GPU_CULLMODE_NONE, .front_face = GPU_FRONTFACE_COUNTER_CLOCKWISE}}, - LINE = {GPU_PRIMITIVETYPE_LINELIST, {.fill_mode = GPU_FILLMODE_LINE, .cull_mode = GPU_CULLMODE_NONE, .front_face = GPU_FRONTFACE_COUNTER_CLOCKWISE}}, + RECT {GPU_PRIMITIVETYPE_TRIANGLELIST, {.fill_mode = GPU_FILLMODE_FILL, .cull_mode = GPU_CULLMODE_NONE, .front_face = GPU_FRONTFACE_COUNTER_CLOCKWISE}}, + SPRITE {GPU_PRIMITIVETYPE_TRIANGLELIST, {.fill_mode = GPU_FILLMODE_FILL, .cull_mode = GPU_CULLMODE_NONE, .front_face = GPU_FRONTFACE_COUNTER_CLOCKWISE}}, + LINE {GPU_PRIMITIVETYPE_LINELIST, {.fill_mode = GPU_FILLMODE_LINE, .cull_mode = GPU_CULLMODE_NONE, .front_face = GPU_FRONTFACE_COUNTER_CLOCKWISE}}, } // create a graphics pipeline to draw to the window using a set of vertex/fragment shaders @@ -575,8 +575,8 @@ fn void Renderer.create_pipeline(&self, String shader_name, PipelineType type) // NOTE: with TEXTUREUSAGE_SAMPLER the texture format cannot be intger _UINT so it has to be nermalized enum TextureType : (GPUTextureFormat format) { - FULL_COLOR = GPU_TEXTUREFORMAT_R8G8B8A8_UNORM, - JUST_ALPHA = GPU_TEXTUREFORMAT_R8_UNORM + FULL_COLOR {GPU_TEXTUREFORMAT_R8G8B8A8_UNORM}, + JUST_ALPHA {GPU_TEXTUREFORMAT_R8_UNORM} }