[Gambas-devel] GLSL language

tommyline at ...674... tommyline at ...674...
Wed Aug 3 09:30:50 CEST 2011


Hi Laurent,
Thanks for help, but I'm stuck with quadrics and nurbs. I tried to create quadrc and nurb objects, as Benoit guided me, but got segfault error when tried them.
I don't know where to go next. I'm sure I got something wrong, maybe you can find it. I attach cquadric.c, cquadric.h, quadratic.c and glu.c, Smallest project using quadriatics and valrind output.



----- Original Message -----
From: "Laurent Carlier" <lordheavym at ...176...>
To: "mailing list for gambas developers" <gambas-devel at ...494...t>
Sent: Wednesday, 3 August, 2011 8:22:19 AM
Subject: Re: [Gambas-devel] GLSL language

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.

++


------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Gambas-devel mailing list
Gambas-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cgluquadric.c
Type: text/x-csrc
Size: 1846 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20110803/3550afdc/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cgluquadric.h
Type: text/x-chdr
Size: 1431 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20110803/3550afdc/attachment.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GLUquadratic.c
Type: text/x-csrc
Size: 2660 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20110803/3550afdc/attachment-0001.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GLU.c
Type: text/x-csrc
Size: 4066 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20110803/3550afdc/attachment-0002.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: quadric.tar
Type: application/x-tar
Size: 7526 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20110803/3550afdc/attachment.tar>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: valgrind.out
Type: application/octet-stream
Size: 6083 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20110803/3550afdc/attachment.obj>


More information about the Devel mailing list