GLsizei: ptrdiff_t -> int (like GLEW); add missing FGH_ prefix for OpenGL 2.0 prototype typedef's
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1226 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
6b02c619e7
commit
4349a9ec2d
@ -40,13 +40,13 @@ void FGAPIENTRY glutSetVertexAttribNormal(GLint attrib) {
|
||||
void fgInitGL2() {
|
||||
fgState.HasOpenGL20 = 0;
|
||||
#define CHECK(func, a) if ((a) == NULL) { fgWarning("fgInitGL2: " func " is NULL"); return; }
|
||||
CHECK("fghGenBuffers", fghGenBuffers = (PFNGLGENBUFFERSPROC) glutGetProcAddress ("glGenBuffers"));
|
||||
CHECK("fghDeleteBuffers", fghDeleteBuffers = (PFNGLDELETEBUFFERSPROC) glutGetProcAddress ("glDeleteBuffers"));
|
||||
CHECK("fghBindBuffer", fghBindBuffer = (PFNGLBINDBUFFERPROC) glutGetProcAddress ("glBindBuffer"));
|
||||
CHECK("fghBufferData", fghBufferData = (PFNGLBUFFERDATAPROC) glutGetProcAddress ("glBufferData"));
|
||||
CHECK("fghVertexAttribPointer", fghVertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC) glutGetProcAddress ("glVertexAttribPointer"));
|
||||
CHECK("fghEnableVertexAttribArray", fghEnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC) glutGetProcAddress ("glEnableVertexAttribArray"));
|
||||
CHECK("fghDisableVertexAttribArray", fghDisableVertexAttribArray = (PFNGLDISABLEVERTEXATTRIBARRAYPROC) glutGetProcAddress ("glDisnableVertexAttribArray"));
|
||||
CHECK("fghGenBuffers", fghGenBuffers = (FGH_PFNGLGENBUFFERSPROC) glutGetProcAddress ("glGenBuffers"));
|
||||
CHECK("fghDeleteBuffers", fghDeleteBuffers = (FGH_PFNGLDELETEBUFFERSPROC) glutGetProcAddress ("glDeleteBuffers"));
|
||||
CHECK("fghBindBuffer", fghBindBuffer = (FGH_PFNGLBINDBUFFERPROC) glutGetProcAddress ("glBindBuffer"));
|
||||
CHECK("fghBufferData", fghBufferData = (FGH_PFNGLBUFFERDATAPROC) glutGetProcAddress ("glBufferData"));
|
||||
CHECK("fghVertexAttribPointer", fghVertexAttribPointer = (FGH_PFNGLVERTEXATTRIBPOINTERPROC) glutGetProcAddress ("glVertexAttribPointer"));
|
||||
CHECK("fghEnableVertexAttribArray", fghEnableVertexAttribArray = (FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC) glutGetProcAddress ("glEnableVertexAttribArray"));
|
||||
CHECK("fghDisableVertexAttribArray", fghDisableVertexAttribArray = (FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC) glutGetProcAddress ("glDisnableVertexAttribArray"));
|
||||
#undef CHECK
|
||||
fgState.HasOpenGL20 = 1;
|
||||
}
|
||||
|
@ -36,21 +36,21 @@
|
||||
#define FGH_STATIC_DRAW 0x88E4
|
||||
#define FGH_ELEMENT_ARRAY_BUFFER 0x8893
|
||||
|
||||
typedef ptrdiff_t fghGLsizeiptr;
|
||||
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);
|
||||
typedef int fghGLsizeiptr;
|
||||
typedef void (APIENTRY *FGH_PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
|
||||
typedef void (APIENTRY *FGH_PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
|
||||
typedef void (APIENTRY *FGH_PFNGLBUFFERDATAPROC) (GLenum target, fghGLsizeiptr size, const GLvoid *data, GLenum usage);
|
||||
typedef void (APIENTRY *FGH_PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint* buffers);
|
||||
typedef void (APIENTRY *FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
|
||||
typedef void (APIENTRY *FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint);
|
||||
typedef void (APIENTRY *FGH_PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
|
||||
|
||||
PFNGLGENBUFFERSPROC fghGenBuffers;
|
||||
PFNGLDELETEBUFFERSPROC fghDeleteBuffers;
|
||||
PFNGLBINDBUFFERPROC fghBindBuffer;
|
||||
PFNGLBUFFERDATAPROC fghBufferData;
|
||||
PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray;
|
||||
PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray;
|
||||
PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer;
|
||||
FGH_PFNGLGENBUFFERSPROC fghGenBuffers;
|
||||
FGH_PFNGLDELETEBUFFERSPROC fghDeleteBuffers;
|
||||
FGH_PFNGLBINDBUFFERPROC fghBindBuffer;
|
||||
FGH_PFNGLBUFFERDATAPROC fghBufferData;
|
||||
FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray;
|
||||
FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray;
|
||||
FGH_PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer;
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user