summaryrefslogtreecommitdiff
path: root/src/qgl_api.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2011-02-05 23:16:52 +0300
committerAndrey Nazarov <skuller@skuller.net>2011-02-05 23:34:41 +0300
commit9611639bf3f31eb2af1eddbe83f9ba6c18550a7e (patch)
treea548b95e74eb6d795678d50a3989664d8419b8d2 /src/qgl_api.c
parentffe5f8a1ae577ecbc60b7cc130c07135a662e21a (diff)
Remove duplicate qwglGetProcAddress definition.
Diffstat (limited to 'src/qgl_api.c')
-rw-r--r--src/qgl_api.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/qgl_api.c b/src/qgl_api.c
index 0ee81a8..359d956 100644
--- a/src/qgl_api.c
+++ b/src/qgl_api.c
@@ -134,7 +134,8 @@ void ( APIENTRY * qglViewport )(GLint x, GLint y, GLsizei width, GLsizei height)
//
#ifdef _WIN32
-static PROC ( WINAPI * qwglGetProcAddress )( LPCSTR );
+// this one is defined in win_wgl.c
+extern PROC ( WINAPI * qwglGetProcAddress )( LPCSTR );
#endif
//
@@ -931,10 +932,6 @@ void QGL_Shutdown( void ) {
qglVertexPointer = NULL;
qglViewport = NULL;
-#ifdef _WIN32
- qwglGetProcAddress = NULL;
-#endif
-
QGL_ShutdownExtensions( ~0 );
}
@@ -1084,15 +1081,12 @@ void QGL_Init( void ) {
qglTranslatef = dllTranslatef = GPA( "glTranslatef" );
qglVertexPointer = dllVertexPointer = GPA( "glVertexPointer" );
qglViewport = dllViewport = GPA( "glViewport" );
-
-#ifdef _WIN32
- qwglGetProcAddress = GPA( "wglGetProcAddress" );
-#endif
}
#ifdef _WIN32
+// hack, use ICD function for obtaining extensions
#undef GPA
-#define GPA ( void * )qwglGetProcAddress
+#define GPA( a ) ( void * )qwglGetProcAddress( a )
#endif
void QGL_InitExtensions( unsigned mask ) {