mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-22 09:56:22 +01:00
ref: add export that returns GL_GetProcAddress for renderapi
This commit is contained in:
parent
1b4f997951
commit
8f8c8e6614
@ -252,7 +252,7 @@ static render_api_t gRenderAPI =
|
||||
NULL, // GL_TexGen,
|
||||
NULL, // GL_TextureTarget,
|
||||
NULL, // GL_SetTexCoordArrayMode,
|
||||
GL_GetProcAddress,
|
||||
NULL, // GL_GetProcAddress,
|
||||
NULL, // GL_UpdateTexSize,
|
||||
NULL,
|
||||
NULL,
|
||||
@ -309,6 +309,7 @@ static void R_FillRenderAPIFromRef( render_api_t *to, const ref_interface_t *fro
|
||||
to->GL_DrawParticles = from->GL_DrawParticles;
|
||||
to->LightVec = from->LightVec;
|
||||
to->StudioGetTexture = from->StudioGetTexture;
|
||||
to->GL_GetProcAddress = from->R_GetProcAddress;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -583,6 +583,8 @@ typedef struct ref_interface_s
|
||||
void (*R_NewMap)( void );
|
||||
// clear the render entities before each frame
|
||||
void (*R_ClearScene)( void );
|
||||
// GL_GetProcAddress for client renderer
|
||||
void* (*R_GetProcAddress)( const char *name );
|
||||
|
||||
// TriAPI Interface
|
||||
// NOTE: implementation isn't required to be compatible
|
||||
|
@ -332,6 +332,16 @@ qboolean R_SetDisplayTransform( ref_screen_rotation_t rotate, int offset_x, int
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void* GAME_EXPORT R_GetProcAddress( const char *name )
|
||||
{
|
||||
#ifdef XASH_GL4ES
|
||||
extern void *gl4es_GetProcAddress( const char *name );
|
||||
return gl4es_GetProcAddress( name );
|
||||
#else // TODO: other wrappers
|
||||
return gEngFuncs.GL_GetProcAddress( name );
|
||||
#endif
|
||||
}
|
||||
|
||||
static const char *R_GetConfigName( void )
|
||||
{
|
||||
return "opengl";
|
||||
@ -453,6 +463,7 @@ ref_interface_t gReffuncs =
|
||||
Mod_GetCurrentVis,
|
||||
R_NewMap,
|
||||
R_ClearScene,
|
||||
R_GetProcAddress,
|
||||
|
||||
TriRenderMode,
|
||||
TriBegin,
|
||||
@ -503,6 +514,8 @@ void EXPORT GetRefHumanReadableName( char *out, size_t size )
|
||||
Q_strncpy( out, "GLES1(NanoGL)", size );
|
||||
#elif defined XASH_WES
|
||||
Q_strncpy( out, "GLES2(gl-wes-v2)", size );
|
||||
#elif defined XASH_GL4ES
|
||||
Q_strncpy( out, "GLES2(gl4es)", size );
|
||||
#else
|
||||
Q_strncpy( out, "OpenGL", size );
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user