summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rendering.cc2
-rw-r--r--src/rendering.h1
-rw-r--r--src/wayclock.cc2
3 files changed, 3 insertions, 2 deletions
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");