Hi Matías,

Le vendredi 15 août 2008 à 10:12 -0300, Matías De la Puente a écrit :
> Hi Xavier
> 
> I have two ways to put the constants and the functions in the binding:
> 
> The first one is put the constants and the functions as they appear in
> the header file, GLX_SOMETHING for constants and glXSomenthing for
> functions. This can be done if I put this attibute in the namespace:
> 
> [CCode (lower_case_cprefix ="", cheader_filename="GL/glx.h")]   // No
> prefix
> 
> The second one is the way you say, but for doing that i have to group
> the constants because I can't put in the namespace attribute
> lower_case_cprefix="GLX_" because the functions will appear like this:
> GLX_glXSomething or GLX_Somenthing and if I put
> lower_case_cprefix="glX" the constants will appear like this:
> glXSOMETHING or glXGLX_SOMETHING.
> The solution for this is to group de constants, but there's a lot of
> constants and the documentation that I found don't tell me how can I
> groups this contants (including the constants in GL and GLU).
> 
> So I decide to put all the constants and the functions like appear in
> the documentation and will make easier to port code to vala.
> Remember that the constansts and functions are define like this:
> GLX.GLX_SOMETHING and GLX.glXSomenthing but you will use this
> constants and functions like this: GLX_SOMETHING and glXSomething (of
> course if you add "using GLX;" in the top of your vala code.

I understand, but it looks a bit out-of-place in Vala, where each common
prefix has disappeared into the namespaces (except for gl functions
apparently).

        Xav


_______________________________________________
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to