[Gambas-devel] GLSL language

Benoît Minisini gambas at ...1...
Mon Aug 1 11:36:29 CEST 2011


> Hi Benoit, Laurent, Kevin and all interested in OpenGl.
> I've registered new e-mail on both lists, so hopefully I can mail you
> again. Since my last post I tried to get familiar with GLSL and to be able
> to use shaders I had to ater the glsl library.
> 
> First issue in glsl GL.c file:
> 
> GB_STATIC_METHOD("GetUniformLocation", NULL, GLGETUNIFORMLOCATION,
> "(Program)i(Name)s"),
> 
> function should return integer value, not NULL.
> 
> It needs some functions to pass uniform and attribute variables to shaders:
> 
> /* GLattributes.c */
> 	GB_STATIC_METHOD("BindAttribLocation",NULL, GLBINDATTRIBLOCATION,
> "(Program)i(Index)i(Name)s"), GB_STATIC_METHOD("VertexAttrib1f", NULL,
> GLVERTEXATTRIB1F, "(Index)i(X)f"), GB_STATIC_METHOD("VertexAttrib1fv",
> NULL, GLVERTEXATTRIB1FV, "(Index)i(V)Float[]"),
> GB_STATIC_METHOD("VertexAttrib2f", NULL, GLVERTEXATTRIB2F,
> "(Index)i(X)f(Y)f"), GB_STATIC_METHOD("VertexAttrib2fv", NULL,
> GLVERTEXATTRIB2FV, "(Index)i(V)Float[]"),
> GB_STATIC_METHOD("VertexAttrib3f", NULL, GLVERTEXATTRIB3F,
> "(Index)i(X)f(Y)f(Z)f"), GB_STATIC_METHOD("VertexAttrib3fv", NULL,
> GLVERTEXATTRIB3FV, "(Index)i(V)Float[]"),
> GB_STATIC_METHOD("VertexAttrib4f", NULL, GLVERTEXATTRIB4F,
> "(Index)i(X)f(Y)f(Z)f(W)f"), GB_STATIC_METHOD("VertexAttrib4fv", NULL,
> GLVERTEXATTRIB4FV, "(Index)i(V)Float[]"),
> GB_STATIC_METHOD("GenFramebuffersEXT", "i", GLGENFRAMEBUFFERSEXT, "(N)i"),
> GB_STATIC_METHOD("FramebufferTexture2d", NULL, GLFRAMEBUFFERTEXTURE2D,
> "(Target)i(Attachment)i(Textarget)i(Texture)i(Level)i"),
> GB_STATIC_METHOD("BindFramebufferEXT", NULL, GLBINDFRAMEBUFFERSEXT,
> "(Target)i(Framebuffer)i"), GB_STATIC_METHOD("CheckFramebufferStatusEXT",
> "i", GLCHECKFRAMEBUFFERSTATUSEXT, "(Target)i"),
> 
> so, I added them. Send you new GL.c GLattributes.c an GLattributes.h files,
> if you could check them and attach to the repository, I'd be very happy.
> 
> By the way, what is the limit of attachments?
> 
> Regards
> Tomek

256K.

Why don't you get a sourceforge account so that I grant you a write access to 
the subversion repository?

-- 
Benoît Minisini




More information about the Devel mailing list