[Gambas-devel] GLSL language

Laurent Carlier lordheavym at ...176...
Wed Aug 3 09:22:19 CEST 2011


Le Mercredi 3 Août 2011 09:00:41, vous avez écrit :
> Le Lundi 1 Août 2011 10:32:11, tommyline at ...674... a écrit :
> > 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
> 
> The proper place for framebuffer extension is in OPENGL component, not in
> GLSL. This extension isn"t exclusive to glsl. There is also two variant:
> the EXT and ARB variant, see http://www.opengl.org/registry/#arbextspecs
> 
> There is more limitations in the EXT variant, not related to gambas. I guess
> they can be aliases to ARB methods.
> 
> Also a way to check driver ability is necessary, and glew is giving us a
> nice way to do this, see http://glew.sourceforge.net/basic.html (checking
> for extensions)
> 
> Nice job :-)
> 
> ++

Gl.CheckExtensions() method pushed.

++





More information about the Devel mailing list