ref: Fix gl4es build under windows. Static gl functions declared with APIENTRY even without mangling.

This commit is contained in:
lewa_j
2025-07-27 01:06:03 +03:00
committed by a1batross
parent 98e4aae6bb
commit af69df15e1
2 changed files with 3 additions and 3 deletions

View File

@@ -902,7 +902,7 @@ typedef float GLmatrix[16];
#endif
#if XASH_GL_STATIC && !REF_GL_KEEP_MANGLED_FUNCTIONS
#define GL_FUNCTION( name ) name
#define GL_FUNCTION( name ) APIENTRY name
#elif XASH_GL_STATIC && REF_GL_KEEP_MANGLED_FUNCTIONS
#define GL_FUNCTION( name ) APIENTRY p##name
#else

View File

@@ -1490,13 +1490,13 @@ void GL_SetupAttributes( int safegl )
void wes_init( const char *gles2 );
int nanoGL_Init( void );
#if XASH_GL4ES
static void GL4ES_GetMainFBSize( int *width, int *height )
static void APIENTRY GL4ES_GetMainFBSize( int *width, int *height )
{
*width = gpGlobals->width;
*height = gpGlobals->height;
}
static void *GL4ES_GetProcAddress( const char *name )
static void * APIENTRY GL4ES_GetProcAddress( const char *name )
{
if( !Q_strcmp(name, "glShadeModel") )
// combined gles/gles2/gl implementation exports this, but it is invalid