-
Notifications
You must be signed in to change notification settings - Fork 38
Description
I'm currently struggling to get any output from vertex buffer based rendering and I'm trying to find what could be the issue. A possible problem could be the call to glDrawArrays
, which takes the somewhat unusual GLsizeiptr
as parameter (some background on GLsizeiptr
). One thing that confuses me is the size of GLsizeiptr
, which is defined as int32
in the bindings. However, in the official <GL/glext.h>
header, the definition is typedef ptrdiff_t GLsizeiptr;
. Running the following quick check
{.emit: """
#include <stdio.h>
#include <stdlib.h>
void c_call()
{
printf("Size of ptrdiff_t: %d\n", sizeof(ptrdiff_t));
}
proc c_call() {.importc, nodecl.}
c_call()
"""}
# Size of ptrdiff_t: 8
shows on my 64 bit system (Ubuntu 14.04) that the size of ptrdiff_t
and thus GLsizeiptr
should be 8.
I have modified the bindings to force int64
for GLsizeiptr
, but unfortunately this has not fixed my general issue. I'm also surprised that using an int32
did not crash in the first place. Therefore I currently don't know which is correct.