[Gambas-user] gb.glu is missing Glu.project and Glu.unproject

Benoît Minisini gambas at ...1...
Sat Nov 24 14:02:11 CET 2012


Le 24/11/2012 12:05, Laurent Carlier a écrit :
> Le jeudi 22 novembre 2012 20:30:41 laurent bernabe a écrit :
>> Hello,
>>
>> I've noticed that the Gb.glu component is missing the two functions
>> project() and unproject().
>> Will a very next version of Gambas implement it ?
>>
>> Otherwise I've found the implementation code (C++) so that I still can
>> create a new module with both functions :
>> http://www.opengl.org/wiki/GluProject_and_gluUnProject_code
>>
>> Regards.
>
> Glu.Project, Glu.UnProject and Glu.UnProject4 are now part of gb.opengl.glu
> component in rev #5355
>
> http://gambas.svn.sourceforge.net/viewvc/gambas?view=revision&revision=5355
>
> Regards,
> ++
>

I think that the following code in 'GLUproject.c' is false:

   ...
   for (i=0; i<16; i++)
     view[i] = *((GLdouble *)GB.Array.Get(VARG(Model),i));
   for (i=0; i<16; i++)
     view[i] = *((GLdouble *)GB.Array.Get(VARG(Proj),i));
   for (i=0; i<4; i++)
     view[i] = *((GLint *)GB.Array.Get(VARG(View),i));
   ...	

Do you want me to add to the Gambas API helper functions to quickly 
convert between a Gambas array and a C array?

-- 
Benoît Minisini




More information about the User mailing list