On Wed, 30 Dec 2015, Martin Cristia wrote:
> How to declare arrays when making a component, ie :(C declaration in library)void glVertexPointer(GLint size, GLenum type, GLsize stride, const GLvoid*array)
> C gb component:
> GB_STATIC_METHOD( ......??
This is the response I gave you at gambas-user:
On Wed, 30 Dec 2015, Tobias Boege wrote:
> I'll tell you how I answer such questions for myself when I forgot the
> details: think hard if any Gambas component has any class with a method
> that returns an array object. If you're lucky there is such a component
> which is written in C. Then look into its source code how it's done.
> In this case I remembered that gb.net.curl's HttpClient can return a
> String of headers. You go to gb.net.curl/src/CHttpClient.c and find:
> GB_PROPERTY_READ("Headers", "String", HttpClient_Headers),
> that is you treat array types like every other class by writing the full
> class name into the signature. Only the primitive data types have
I may add the following to specifically address your question:
The actual types ("i" for Integer, "Object" for an array of generic
objects) may vary -- I don't know how OpenGL types translate to Gambas ones
and guessed the values above. Your method may or may not need to be static.
You may also want to read the article linked here on native component
development for Gambas.