comparison test/testdyngl.c @ 885:9f6ad2286011

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.
author Sam Lantinga <slouken@libsdl.org>
date Fri, 30 Apr 2004 18:33:30 +0000
parents 0afe0e38e02c
children 4ab6d1fd028f
comparison
equal deleted inserted replaced
884:20d3a599f601 885:9f6ad2286011
37 } 37 }
38 } 38 }
39 39
40 typedef struct 40 typedef struct
41 { 41 {
42 void(*glBegin)(GLenum); 42 void(APIENTRY*glBegin)(GLenum);
43 void(*glEnd)(); 43 void(APIENTRY*glEnd)();
44 void(*glVertex3f)(GLfloat, GLfloat, GLfloat); 44 void(APIENTRY*glVertex3f)(GLfloat, GLfloat, GLfloat);
45 void(*glClearColor)(GLfloat, GLfloat, GLfloat, GLfloat); 45 void(APIENTRY*glClearColor)(GLfloat, GLfloat, GLfloat, GLfloat);
46 void(*glClear)(GLbitfield); 46 void(APIENTRY*glClear)(GLbitfield);
47 void(*glDisable)(GLenum); 47 void(APIENTRY*glDisable)(GLenum);
48 void(*glEnable)(GLenum); 48 void(APIENTRY*glEnable)(GLenum);
49 void(*glColor4ub)(GLubyte,GLubyte,GLubyte,GLubyte); 49 void(APIENTRY*glColor4ub)(GLubyte,GLubyte,GLubyte,GLubyte);
50 void(*glPointSize)(GLfloat); 50 void(APIENTRY*glPointSize)(GLfloat);
51 void(*glHint)(GLenum,GLenum); 51 void(APIENTRY*glHint)(GLenum,GLenum);
52 void(*glBlendFunc)(GLenum,GLenum); 52 void(APIENTRY*glBlendFunc)(GLenum,GLenum);
53 void(*glMatrixMode)(GLenum); 53 void(APIENTRY*glMatrixMode)(GLenum);
54 void(*glLoadIdentity)(); 54 void(APIENTRY*glLoadIdentity)();
55 void(*glOrtho)(GLdouble,GLdouble,GLdouble,GLdouble,GLdouble,GLdouble); 55 void(APIENTRY*glOrtho)(GLdouble,GLdouble,GLdouble,GLdouble,GLdouble,GLdouble);
56 void(*glRotatef)(GLfloat,GLfloat,GLfloat,GLfloat); 56 void(APIENTRY*glRotatef)(GLfloat,GLfloat,GLfloat,GLfloat);
57 void(*glViewport)(GLint,GLint,GLsizei,GLsizei); 57 void(APIENTRY*glViewport)(GLint,GLint,GLsizei,GLsizei);
58 void(*glFogf)(GLenum,GLfloat); 58 void(APIENTRY*glFogf)(GLenum,GLfloat);
59 } 59 }
60 glfuncs; 60 glfuncs;
61 61
62 void init_glfuncs(glfuncs* f) 62 void init_glfuncs(glfuncs* f)
63 { 63 {