Generic (void *)int

Giuseppe Barbieri elect86 at gmail.com
Mon Feb 18 09:44:34 UTC 2019


 Thanks Sundar,

that works flawless for `(void *)0`

But now I also would need a generic solution, for example:

(void *)12

There is a sill opengl call ( glVertexPointer ) requesting explicitely
that: https://stackoverflow.com/a/8283855/1047713

Signature:

void glVertexAttribPointer(int index, int size, int type, byte
normalized, int stride, Pointer<?> pointer);


is there actually a way?






You can use Pointer.nullPointer() method.

-Sundar

On 18/02/19, 8:09 AM, Giuseppe Barbieri wrote:
> Hi,
>
> I'm looking for a way to convert this:
>
> (void*)0
>
> in Java.
>
> I tried to allocate a pointer and set its value to 0, but it didnt work
>
> Any ideas, guys?
>
> Thanks in advance


More information about the panama-dev mailing list