mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-20 12:00:47 +00: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_TexGen,
|
||||||
NULL, // GL_TextureTarget,
|
NULL, // GL_TextureTarget,
|
||||||
NULL, // GL_SetTexCoordArrayMode,
|
NULL, // GL_SetTexCoordArrayMode,
|
||||||
GL_GetProcAddress,
|
NULL, // GL_GetProcAddress,
|
||||||
NULL, // GL_UpdateTexSize,
|
NULL, // GL_UpdateTexSize,
|
||||||
NULL,
|
NULL,
|
||||||
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->GL_DrawParticles = from->GL_DrawParticles;
|
||||||
to->LightVec = from->LightVec;
|
to->LightVec = from->LightVec;
|
||||||
to->StudioGetTexture = from->StudioGetTexture;
|
to->StudioGetTexture = from->StudioGetTexture;
|
||||||
|
to->GL_GetProcAddress = from->R_GetProcAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -583,6 +583,8 @@ typedef struct ref_interface_s
|
|||||||
void (*R_NewMap)( void );
|
void (*R_NewMap)( void );
|
||||||
// clear the render entities before each frame
|
// clear the render entities before each frame
|
||||||
void (*R_ClearScene)( void );
|
void (*R_ClearScene)( void );
|
||||||
|
// GL_GetProcAddress for client renderer
|
||||||
|
void* (*R_GetProcAddress)( const char *name );
|
||||||
|
|
||||||
// TriAPI Interface
|
// TriAPI Interface
|
||||||
// NOTE: implementation isn't required to be compatible
|
// 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;
|
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 )
|
static const char *R_GetConfigName( void )
|
||||||
{
|
{
|
||||||
return "opengl";
|
return "opengl";
|
||||||
@ -453,6 +463,7 @@ ref_interface_t gReffuncs =
|
|||||||
Mod_GetCurrentVis,
|
Mod_GetCurrentVis,
|
||||||
R_NewMap,
|
R_NewMap,
|
||||||
R_ClearScene,
|
R_ClearScene,
|
||||||
|
R_GetProcAddress,
|
||||||
|
|
||||||
TriRenderMode,
|
TriRenderMode,
|
||||||
TriBegin,
|
TriBegin,
|
||||||
@ -503,6 +514,8 @@ void EXPORT GetRefHumanReadableName( char *out, size_t size )
|
|||||||
Q_strncpy( out, "GLES1(NanoGL)", size );
|
Q_strncpy( out, "GLES1(NanoGL)", size );
|
||||||
#elif defined XASH_WES
|
#elif defined XASH_WES
|
||||||
Q_strncpy( out, "GLES2(gl-wes-v2)", size );
|
Q_strncpy( out, "GLES2(gl-wes-v2)", size );
|
||||||
|
#elif defined XASH_GL4ES
|
||||||
|
Q_strncpy( out, "GLES2(gl4es)", size );
|
||||||
#else
|
#else
|
||||||
Q_strncpy( out, "OpenGL", size );
|
Q_strncpy( out, "OpenGL", size );
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user