From a3ed564963c90460c6d9246b775e8b6e1d4984cf Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 30 Apr 2004 18:33:30 +0000 Subject: [PATCH] Date: Wed, 28 Apr 2004 16:52:41 -0400 From: "Damien A" Subject: testdyngl fix The test program you included in the latest version of SDL crashes on startup in Window (XP). The reason for this is that OpenGL functions on Windows use the __stdcall calling convention, not the C convention. Placing APIENTRY infront of the * operator solves this problem. --- test/testdyngl.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/test/testdyngl.c b/test/testdyngl.c index e88bd711a..647774ff5 100644 --- a/test/testdyngl.c +++ b/test/testdyngl.c @@ -39,23 +39,23 @@ void* get_funcaddr(const char* p) typedef struct { - void(*glBegin)(GLenum); - void(*glEnd)(); - void(*glVertex3f)(GLfloat, GLfloat, GLfloat); - void(*glClearColor)(GLfloat, GLfloat, GLfloat, GLfloat); - void(*glClear)(GLbitfield); - void(*glDisable)(GLenum); - void(*glEnable)(GLenum); - void(*glColor4ub)(GLubyte,GLubyte,GLubyte,GLubyte); - void(*glPointSize)(GLfloat); - void(*glHint)(GLenum,GLenum); - void(*glBlendFunc)(GLenum,GLenum); - void(*glMatrixMode)(GLenum); - void(*glLoadIdentity)(); - void(*glOrtho)(GLdouble,GLdouble,GLdouble,GLdouble,GLdouble,GLdouble); - void(*glRotatef)(GLfloat,GLfloat,GLfloat,GLfloat); - void(*glViewport)(GLint,GLint,GLsizei,GLsizei); - void(*glFogf)(GLenum,GLfloat); + void(APIENTRY*glBegin)(GLenum); + void(APIENTRY*glEnd)(); + void(APIENTRY*glVertex3f)(GLfloat, GLfloat, GLfloat); + void(APIENTRY*glClearColor)(GLfloat, GLfloat, GLfloat, GLfloat); + void(APIENTRY*glClear)(GLbitfield); + void(APIENTRY*glDisable)(GLenum); + void(APIENTRY*glEnable)(GLenum); + void(APIENTRY*glColor4ub)(GLubyte,GLubyte,GLubyte,GLubyte); + void(APIENTRY*glPointSize)(GLfloat); + void(APIENTRY*glHint)(GLenum,GLenum); + void(APIENTRY*glBlendFunc)(GLenum,GLenum); + void(APIENTRY*glMatrixMode)(GLenum); + void(APIENTRY*glLoadIdentity)(); + void(APIENTRY*glOrtho)(GLdouble,GLdouble,GLdouble,GLdouble,GLdouble,GLdouble); + void(APIENTRY*glRotatef)(GLfloat,GLfloat,GLfloat,GLfloat); + void(APIENTRY*glViewport)(GLint,GLint,GLsizei,GLsizei); + void(APIENTRY*glFogf)(GLenum,GLfloat); } glfuncs;