[Gambas-devel] Api component updated
Daniel Campos
daniel.campos at ...103...
Sun Apr 24 16:00:09 CEST 2005
fabien escribió:
>Le Dimanche 24 Avril 2005 15:15, Daniel Campos a écrit :
>
>
>>Fixes and some new features in the gb.api component, documentation updated.
>>
>>http://gambas.gnulinex.org/api
>>
>>Regards,
>>
>>D. Campos
>>
>>
>>
>>
>
>Look at my tarball please daniel and say me what is bad !
>
>regards,
>fabien
>
>
It seems the "glutInit" function needs two parameters, and you're
trying to use it without parameters. Both parameters refers to the
"argc" and "argv" parameters in a C program. Here I pass one parameter,
the name of the program:
DIM hVoid AS NEW ApiPointer
DIM hStr AS ApiPointer
DIM hCount AS NEW ApiPointer
DIM hPar AS NEW ApiPointer
DIM sPar AS NEW ApiPointer
hCount.Alloc(Api.intSize)
hCount.PutInt32(0, 1)
sPar.AllocString(Application.Name)
hPar.Alloc(Api.pointerSize)
hPar.PutPointer(0, sPar)
ApiCall.glutInit(hCount, hPar)
ApiCall.glutInitDisplayMode(0)
ApiCall.glutInitWindowPosition(200, 200)
ApiCall.glutInitWindowSize(250, 250)
hStr = NEW apiPointer
hstr.AllocString("ogl1")
ApiCall.glutCreateWindow(hStr)
hStr.Free()
More information about the Devel
mailing list