Fixing glew2bmx so I can update Glew
BlitzMax Forums/OpenGL Module/Fixing glew2bmx so I can update Glew
| ||
Was looking over glew2bmx after trying to update glew. There were some of the regular errors (exp: "***** __glewGetBufferParameteri64v *****") but I also noticed it wasn't adding certain constants. #define GL_ZERO 0 output: Const GL_ZERO=0 #define GL_TRUE 1 output: *nothing* And it is because of this code: Else If curr="#" If bump()="define" Local id$=bump() If id[..11]="GL_VERSION_" Else If id[..3]="GL_" DebugStop If Not constMap.ValueForKey(id) Local n$=bump() If n[..2]="0x" Print "Const "+id+"=$"+n[2..] Else If n.length And isdigit(n[0]) And n<>"1" Print "Const "+id+"="+n EndIf constMap.Insert id,n EndIf Specifically, this line: Else If n.length And isdigit(n[0]) And n<>"1" (n<>"1") Because n was actually "1" (since it was the value after all...) it just skips over it. I was going to remove it but I wanted to know the purpose of putting it there in the first place. |
| ||
Also I narrowed down the regular errors to being weirdly placed asterisks. No Errors: GLuint* ids '(makes ids a Ptr) Full Line: typedef void (GLAPIENTRY * PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled); Errors: GLvoid *userParam '(unsure what this is supposed to dp) GLint64 * '(or this - it's just a random astericks after GLint64 and nothing following it) Full Lines: 1: typedef void (GLAPIENTRY * PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, GLvoid *userParam); 2: typedef void (GLAPIENTRY * PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum, GLenum, GLint64 *); |