mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-23 13:24:13 +00:00
ref_soft: context: upgrade to latest RefAPI
This commit is contained in:
parent
a2cba95a3a
commit
9c4a0d2397
12
r_context.c
12
r_context.c
@ -446,10 +446,16 @@ void GAME_EXPORT GL_SetupAttributes( int safegl )
|
||||
gEngfuncs.GL_SetAttribute( REF_GL_BLUE_SIZE, 5 );
|
||||
}
|
||||
|
||||
const char *R_GetConfigName( void )
|
||||
{
|
||||
return "ref_soft"; // software specific cvars will go to ref_soft.cfg
|
||||
}
|
||||
|
||||
ref_interface_t gReffuncs =
|
||||
{
|
||||
R_Init,
|
||||
R_Shutdown,
|
||||
R_GetConfigName,
|
||||
|
||||
GL_SetupAttributes,
|
||||
GL_InitExtensions,
|
||||
@ -472,7 +478,6 @@ ref_interface_t gReffuncs =
|
||||
R_ProcessEntData,
|
||||
|
||||
R_ShowTextures,
|
||||
R_ShowTree,
|
||||
|
||||
R_GetTextureOriginalBuffer,
|
||||
GL_LoadTextureFromBuffer,
|
||||
@ -604,3 +609,8 @@ int EXPORT GAME_EXPORT GetRefAPI( int version, ref_interface_t *funcs, ref_api_t
|
||||
|
||||
return REF_API_VERSION;
|
||||
}
|
||||
|
||||
void EXPORT GetRefHumanReadableName( char *out, size_t size )
|
||||
{
|
||||
Q_strncpy( out, "Software", size );
|
||||
}
|
||||
|
@ -829,7 +829,7 @@ static image_t *GL_TextureForName( const char *name )
|
||||
uint hash;
|
||||
|
||||
// find the texture in array
|
||||
hash = gEngfuncs.COM_HashKey( name, TEXTURES_HASH_SIZE );
|
||||
hash = COM_HashKey( name, TEXTURES_HASH_SIZE );
|
||||
|
||||
for( tex = r_imagesHashTable[hash]; tex != NULL; tex = tex->nextHash )
|
||||
{
|
||||
@ -870,7 +870,7 @@ static image_t *GL_AllocTexture( const char *name, texFlags_t flags )
|
||||
tex->flags = flags;
|
||||
|
||||
// add to hash table
|
||||
tex->hashValue = gEngfuncs.COM_HashKey( name, TEXTURES_HASH_SIZE );
|
||||
tex->hashValue = COM_HashKey( name, TEXTURES_HASH_SIZE );
|
||||
tex->nextHash = r_imagesHashTable[tex->hashValue];
|
||||
r_imagesHashTable[tex->hashValue] = tex;
|
||||
|
||||
@ -1380,7 +1380,7 @@ void R_InitImages( void )
|
||||
|
||||
// create unused 0-entry
|
||||
Q_strncpy( r_images->name, "*unused*", sizeof( r_images->name ));
|
||||
r_images->hashValue = gEngfuncs.COM_HashKey( r_images->name, TEXTURES_HASH_SIZE );
|
||||
r_images->hashValue = COM_HashKey( r_images->name, TEXTURES_HASH_SIZE );
|
||||
r_images->nextHash = r_imagesHashTable[r_images->hashValue];
|
||||
r_imagesHashTable[r_images->hashValue] = r_images;
|
||||
r_numImages = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user