Browse Source

ref_soft: Fix transparency in API

pull/2/head
mittorn 6 years ago
parent
commit
d03d29f6f5
  1. 2
      r_context.c
  2. 1
      r_local.h
  3. 14
      r_triapi.c

2
r_context.c

@ -592,7 +592,7 @@ ref_interface_t gReffuncs = @@ -592,7 +592,7 @@ ref_interface_t gReffuncs =
TriBegin,
TriEnd,
_TriColor4f,
TriColor4ub,
_TriColor4ub,
TriTexCoord2f,
TriVertex3fv,
TriVertex3f,

1
r_local.h

@ -678,6 +678,7 @@ void TriVertex3fv( const float *v ); @@ -678,6 +678,7 @@ 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 _TriColor4ub( byte r, byte g, byte b, byte a );
int TriWorldToScreen( const float *world, float *screen );
int TriSpriteTexture( model_t *pSpriteModel, int frame );
void TriFog( float flFogColor[3], float flStart, float flEnd, int bOn );

14
r_triapi.c

@ -200,6 +200,20 @@ void TriColor4ub( byte r, byte g, byte b, byte a ) @@ -200,6 +200,20 @@ void TriColor4ub( byte r, byte g, byte b, byte a )
_TriColor4f( ds.triRGBA[0], ds.triRGBA[1], ds.triRGBA[2], 1.0f );
}
/*
=============
TriColor4ub
=============
*/
void _TriColor4ub( byte r, byte g, byte b, byte a )
{
_TriColor4f( r * (1.0f / 255.0f),
g * (1.0f / 255.0f),
b * (1.0f / 255.0f),
a * (1.0f / 255.0f));
}
/*
=================
TriColor4f

Loading…
Cancel
Save