Changed color types in sprite

This commit is contained in:
korenkonder
2023-12-19 20:49:30 +03:00
parent 52795e805a
commit f13931d3a9
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -11,7 +11,7 @@
struct sprite_draw_vertex {
vec3 pos;
vec2 uv[2];
vec4u8 color;
color4u8 color;
};
struct sprite_draw_param {
@@ -558,7 +558,7 @@ namespace spr {
return;
// BGRA to RGBA
const vec4u8 color = { args.color.z, args.color.y, args.color.x, args.color.w };
const color4u8 color = { args.color.r, args.color.g, args.color.b, args.color.a };
if (font)
draw_sprite_scale(&args);
+2 -2
View File
@@ -157,7 +157,7 @@ namespace spr {
struct SpriteVertex {
vec3 pos;
vec2 uv;
vec4u8 color;
color4u8 color;
};
struct SprArgs {
@@ -180,7 +180,7 @@ namespace spr {
SprKind kind;
IDUnion id;
vec4u8 color;
color4u8_bgra color;
SprAttr attr;
int32_t blend;
int32_t index;