nigels-com / glew

The OpenGL Extension Wrangler Library
Other
2.58k stars 608 forks source link

GLsizeiptr is supposed to be unsigned #373

Closed dukeeeey closed 1 year ago

dukeeeey commented 1 year ago

On windows

typedef ptrdiff_t GLintptr; typedef ptrdiff_t GLsizeiptr;

Both are signed

ifdef _WIN64

typedef unsigned __int64 size_t;
typedef __int64          ptrdiff_t;
typedef __int64          intptr_t;

else

typedef unsigned int     size_t;
typedef int              ptrdiff_t;
typedef int              intptr_t;

endif

nigels-com commented 1 year ago

Agreed. https://www.khronos.org/opengl/wiki/OpenGL_Type

nigels-com commented 1 year ago

However, it signed in glcorearb.h

#ifndef GL_VERSION_1_5
#define GL_VERSION_1_5 1
typedef khronos_ssize_t GLsizeiptr;
typedef khronos_intptr_t GLintptr;
dukeeeey commented 1 year ago

Yeah strange, guess i'll close this then.