From 616d099498ec573ec32ec1eb91ddc076c7622d31 Mon Sep 17 00:00:00 2001 From: Fabrice Date: Wed, 11 Feb 2026 22:00:11 +0100 Subject: fix color channels --- src/rendering.cc | 2 +- src/rendering.h | 1 + src/wayclock.cc | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/rendering.cc b/src/rendering.cc index 8044688..3870cf6 100644 --- a/src/rendering.cc +++ b/src/rendering.cc @@ -110,7 +110,7 @@ void wayc_atlas_set(atlas_s* atlas, image_data_type_e data_type, ivec2 offset, wayc_notnull(data); wayc_image_upload(atlas->texture, offset, width, height, IMAGE_TYPE_2D, - IMAGE_FORMAT_RGBA, data_type, data); + atlas->format, data_type, data); } void wayc_atlas_deinit(atlas_s* atlas) { diff --git a/src/rendering.h b/src/rendering.h index a1ad270..85d3d88 100644 --- a/src/rendering.h +++ b/src/rendering.h @@ -12,6 +12,7 @@ enum image_type_e { enum image_format_e { IMAGE_FORMAT_RGBA = GL_RGBA, + IMAGE_FORMAT_RED = GL_RED, }; enum image_data_type_e { diff --git a/src/wayclock.cc b/src/wayclock.cc index d5f1daa..b0212cb 100644 --- a/src/wayclock.cc +++ b/src/wayclock.cc @@ -110,7 +110,7 @@ int main() { glClearColor(0.1f, 0.2f, 0.2f, 1.0f); struct atlas_s atlas; - if (!wayc_atlas_init(&atlas, IMAGE_FORMAT_RGBA, WAYC_ATLAS_WIDTH, + if (!wayc_atlas_init(&atlas, IMAGE_FORMAT_RED, WAYC_ATLAS_WIDTH, WAYC_ATLAS_HEIGHT)) wayc_panic("Failed to initialize atlas"); -- cgit v1.2.3