X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_gl2.c;h=cad2fc96ede81121ba778bc179ba0738c9ed249b;hb=bc861a62269504a0f7001548d33626be17b77339;hp=e7dea50fc56a025c51d0d2e644057d02f0360bea;hpb=39c957d9929f0aba775c4a07a70b6124bc4b50e6;p=freeglut diff --git a/src/fg_gl2.c b/src/fg_gl2.c index e7dea50..cad2fc9 100644 --- a/src/fg_gl2.c +++ b/src/fg_gl2.c @@ -27,32 +27,16 @@ #include "fg_internal.h" #include "fg_gl2.h" -void glutSetVertexAttribCoord3(GLint attrib) { +void FGAPIENTRY glutSetVertexAttribCoord3(GLint attrib) { if (fgStructure.CurrentWindow != NULL) fgStructure.CurrentWindow->Window.attribute_v_coord = attrib; } -void glutSetVertexAttribNormal(GLint attrib) { +void FGAPIENTRY glutSetVertexAttribNormal(GLint attrib) { if (fgStructure.CurrentWindow != NULL) fgStructure.CurrentWindow->Window.attribute_v_normal = attrib; } -typedef void (APIENTRY *PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); -typedef void (APIENTRY *PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); -typedef void (APIENTRY *PFNGLBUFFERDATAPROC) (GLenum target, fghGLsizeiptr size, const GLvoid *data, GLenum usage); -typedef void (APIENTRY *PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint* buffers); -typedef void (APIENTRY *PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); -typedef void (APIENTRY *PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint); -typedef void (APIENTRY *PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); - -PFNGLGENBUFFERSPROC fghGenBuffers = NULL; -PFNGLDELETEBUFFERSPROC fghDeleteBuffers = NULL; -PFNGLBINDBUFFERPROC fghBindBuffer = NULL; -PFNGLBUFFERDATAPROC fghBufferData = NULL; -PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray = NULL; -PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray = NULL; -PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer = NULL; - void fgInitGL2() { fgState.HasOpenGL20 = 0; #define CHECK(func, a) if ((a) == NULL) { fgWarning("fgInitGL2: " func " is NULL"); return; }