Luca, when I test it now I get that the method don't do anything (and
it should).
Test code:
GLuint[2] a = {20000,50000};
glGenBuffers (a);
stdout.printf ("Buffers: " + ((uint)a[0]).to_string () + ", "+
((uint)a[1]).to_string () + "\n");
....
public extern void glGenBuffers ([CCode (array_length_pos = 0.1)] GL.GLuint[]
buffers);
And output:
Buffers: 20000, 50000
So it seems that it don't do anything, when it should change values.
My OpenGL hardware&drivers are fine.
The other GL code in my program display a simple triangle that
works 100%, and so is Compiz Fusion.
Do you know what is the problem?
Tal
Date: Sun, 15 Apr 2012 11:26:41 +0200
Subject: Re: [Vala] Allow passing ref/out as a pointer.
From: [email protected]
To: [email protected]
CC: [email protected]
2012/4/15 Tal Hadad <[email protected]>
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
_______________________________________________
vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list