From 1cfb5c67d50db02fd31eb974c7292ff6758f1ef3 Mon Sep 17 00:00:00 2001 From: Alejandro Ricoveri Date: Fri, 22 Nov 2013 08:17:34 -0430 Subject: [PATCH] QGL renundancy cleanup Despite QGL is only handling GL extensions, there was a little code renundancy. QGL_EXT_Reset sets all extension pointers to NULL. --- src/backends/generic/qgl.c | 37 +++++++++++++++++++------------------ src/backends/generic/vid.c | 3 --- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/src/backends/generic/qgl.c b/src/backends/generic/qgl.c index 334e95ab..06c593f6 100644 --- a/src/backends/generic/qgl.c +++ b/src/backends/generic/qgl.c @@ -52,18 +52,26 @@ void ( APIENTRY *qglClientActiveTextureARB ) ( GLenum ); /* ========================================================================= */ +void QGL_EXT_Reset ( void ) +{ + qglLockArraysEXT = NULL; + qglUnlockArraysEXT = NULL; + qglPointParameterfEXT = NULL; + qglPointParameterfvEXT = NULL; + qglColorTableEXT = NULL; + qgl3DfxSetPaletteEXT = NULL; + qglMultiTexCoord2fARB = NULL; + qglActiveTextureARB = NULL; + qglClientActiveTextureARB = NULL; +} + +/* ========================================================================= */ + void QGL_Shutdown ( void ) { - qglLockArraysEXT = NULL; - qglUnlockArraysEXT = NULL; - qglPointParameterfEXT = NULL; - qglPointParameterfvEXT = NULL; - qglColorTableEXT = NULL; - qgl3DfxSetPaletteEXT = NULL; - qglMultiTexCoord2fARB = NULL; - qglActiveTextureARB = NULL; - qglClientActiveTextureARB = NULL; + // Reset GL extension pointers + QGL_EXT_Reset(); } /* ========================================================================= */ @@ -71,15 +79,8 @@ QGL_Shutdown ( void ) qboolean QGL_Init (void) { - qglLockArraysEXT = NULL; - qglUnlockArraysEXT = NULL; - qglPointParameterfEXT = NULL; - qglPointParameterfvEXT = NULL; - qglColorTableEXT = NULL; - qgl3DfxSetPaletteEXT = NULL; - qglMultiTexCoord2fARB = NULL; - qglActiveTextureARB = NULL; - qglClientActiveTextureARB = NULL; + // Reset GL extension pointers + QGL_EXT_Reset(); return true; } diff --git a/src/backends/generic/vid.c b/src/backends/generic/vid.c index f67c6231..41bd7c87 100644 --- a/src/backends/generic/vid.c +++ b/src/backends/generic/vid.c @@ -170,9 +170,6 @@ VID_LoadRefresh(void) // Log it! Com_Printf("----- refresher initialization -----\n"); - // Get refresher API exports - //R_GetRefAPI(); - /* Init IN (Mouse) */ in_state.IN_CenterView_fp = IN_CenterView; in_state.Key_Event_fp = Do_Key_Event;