From 8b5926f9b1ee925c3835d64e21d11a3bf59810c6 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 28 Mar 2019 18:11:10 +0300 Subject: [PATCH] ref_gl: fix alpha in menu (and anywhere else where triColor4ub is used) --- ref_gl/gl_context.c | 2 +- ref_gl/gl_local.h | 1 + ref_gl/gl_triapi.c | 12 ++++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ref_gl/gl_context.c b/ref_gl/gl_context.c index ecb6902d..bd68979e 100644 --- a/ref_gl/gl_context.c +++ b/ref_gl/gl_context.c @@ -513,7 +513,7 @@ ref_interface_t gReffuncs = TriBegin, TriEnd, _TriColor4f, - TriColor4ub, + _TriColor4ub, TriTexCoord2f, TriVertex3fv, TriVertex3f, diff --git a/ref_gl/gl_local.h b/ref_gl/gl_local.h index 0d7174b5..55e8fb3d 100644 --- a/ref_gl/gl_local.h +++ b/ref_gl/gl_local.h @@ -577,6 +577,7 @@ void TriTexCoord2f( float u, float v ); void TriVertex3fv( const float *v ); void TriVertex3f( float x, float y, float z ); void _TriColor4f( float r, float g, float b, float a ); +void _TriColor4ub( byte r, byte g, byte b, byte a ); void TriColor4f( float r, float g, float b, float a ); void TriColor4ub( byte r, byte g, byte b, byte a ); void TriBrightness( float brightness ); diff --git a/ref_gl/gl_triapi.c b/ref_gl/gl_triapi.c index 5803c906..eb6b298d 100644 --- a/ref_gl/gl_triapi.c +++ b/ref_gl/gl_triapi.c @@ -131,6 +131,18 @@ void _TriColor4f( float r, float g, float b, float a ) pglColor4f( r, g, b, a ); } +/* +============= +_TriColor4f + +============= +*/ +void _TriColor4ub( byte r, byte g, byte b, byte a ) +{ + pglColor4ub( r, g, b, a ); +} + + /* ============= TriColor4ub