nigels-com / glew

The OpenGL Extension Wrangler Library
Other
2.67k stars 625 forks source link

GLsizeiptr is supposed to be unsigned #373

Closed dukeeeey closed 2 years ago

dukeeeey commented 2 years 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 2 years ago

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

nigels-com commented 2 years 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 2 years ago

Yeah strange, guess i'll close this then.