Re: [Vala] Allow passing ref/out as a pointer.
- From: Luca Bruno <lethalman88 gmail com>
- To: Tal Hadad <tal_hd hotmail com>
- Cc: Vala Mail List <vala-list gnome org>
- Subject: Re: [Vala] Allow passing ref/out as a pointer.
- Date: Sun, 15 Apr 2012 11:26:41 +0200
2012/4/15 Tal Hadad <tal_hd hotmail com>
There's two GL vapis in ExternalBinding page. I'm talking about
the one inside the brackets[0]. This is part of the vapi:
public static void glGenBuffers (GL.GLsizei n, [CCode (array_length =
false, array_null_terminated = true)] out unowned GL.GLuint[] buffers);
public static void glDeleteBuffers (GL.GLsizei n, [CCode (array_length =
false, array_null_terminated = true)] GL.GLuint[]? buffers);
The GL C API is:
void glGenBuffers (GLsize n, GLuint *buffers)
void glDeleteBuffers (GLsize n, GLuint *buffers)
Which n is the count of buffers, and buffers represent a pointer
to the first element.
The generation of method glGenBuffers is completely buggy (i.e.
failed even if I pass an GL.GLuint[] array).
However, the generation of the second method is OK.
Take a look at the first method. What the parameter should be?
Is it should be "out GL.GLuint first_element"?
public static void glGenBuffers ([CCode (array_length_pos = 0.1)]
GL.GLuint[] buffers);
public static void glDeleteBuffers ([CCode (array_length_pos = 0.1)]
GL.GLuint[] buffers);
--
www.debian.org - The Universal Operating System
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]