From tommyline at ...674... Mon Aug 1 11:32:11 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Mon, 1 Aug 2011 10:32:11 +0100 (IST) Subject: [Gambas-devel] GLSL language In-Reply-To: <4719705.1063.1312190167794.JavaMail.root@...675...> Message-ID: <31950446.1177.1312191131847.JavaMail.root@...675...> 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: GL.c Type: text/x-csrc Size: 7607 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: GLattributes.c Type: text/x-csrc Size: 11733 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: GLattributes.h Type: text/x-chdr Size: 1673 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: GLattributes.lo Type: application/octet-stream Size: 302 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Makefile.am Type: application/octet-stream Size: 402 bytes Desc: not available URL: From gambas at ...1... Mon Aug 1 11:36:29 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 1 Aug 2011 11:36:29 +0200 Subject: [Gambas-devel] GLSL language In-Reply-To: <31950446.1177.1312191131847.JavaMail.root@...675...> References: <31950446.1177.1312191131847.JavaMail.root@...675...> Message-ID: <201108011136.29508.gambas@...1...> > 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 From tommyline at ...674... Mon Aug 1 13:04:36 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Mon, 1 Aug 2011 12:04:36 +0100 (IST) Subject: [Gambas-devel] GLSL language In-Reply-To: <201108011136.29508.gambas@...1...> Message-ID: <27639176.2122.1312196676664.JavaMail.root@...675...> Hi Benoit. I have an account with login/user name "tommyline". I'd be honoured to have chance to support Gambas development. Thanks Tomek. From gambas at ...1... Mon Aug 1 13:23:36 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 1 Aug 2011 13:23:36 +0200 Subject: [Gambas-devel] GLSL language In-Reply-To: <27639176.2122.1312196676664.JavaMail.root@...675...> References: <27639176.2122.1312196676664.JavaMail.root@...675...> Message-ID: <201108011323.36826.gambas@...1...> > Hi Benoit. > I have an account with login/user name "tommyline". I'd be honoured to have > chance to support Gambas development. Thanks > Tomek. > Done. You can commit your changes directly to the subversion repository. Please do read the "how to deal with subversion" page on the wiki first! Regards, -- Beno?t Minisini From tommyline at ...674... Mon Aug 1 13:49:26 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Mon, 1 Aug 2011 12:49:26 +0100 (IST) Subject: [Gambas-devel] GLSL language In-Reply-To: <201108011323.36826.gambas@...1...> Message-ID: <25216004.2648.1312199366107.JavaMail.root@...675...> Forgive me my ignorance, but I'm confused with the way of making changes to subversion. I'm just cautious and don't want to mess up things. As I understand, I have to download latest subversion, alter it and then "svn commit" it, right? But how to attach a log (file as I understand)? Please, help, as I want to be constructor rather than destructor :) Tomek ----- Original Message ----- From: "Beno?t Minisini" To: "mailing list for gambas developers" Sent: Monday, 1 August, 2011 12:23:36 PM Subject: Re: [Gambas-devel] GLSL language > Hi Benoit. > I have an account with login/user name "tommyline". I'd be honoured to have > chance to support Gambas development. Thanks > Tomek. > Done. You can commit your changes directly to the subversion repository. Please do read the "how to deal with subversion" page on the wiki first! Regards, -- Beno?t Minisini ------------------------------------------------------------------------------ Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey _______________________________________________ Gambas-devel mailing list Gambas-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-devel From gambas at ...1... Mon Aug 1 13:55:32 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 1 Aug 2011 13:55:32 +0200 Subject: [Gambas-devel] GLSL language In-Reply-To: <25216004.2648.1312199366107.JavaMail.root@...675...> References: <25216004.2648.1312199366107.JavaMail.root@...675...> Message-ID: <201108011355.32412.gambas@...1...> > Forgive me my ignorance, but I'm confused with the way of making changes to > subversion. I'm just cautious and don't want to mess up things. > > As I understand, I have to download latest subversion, alter it and then > "svn commit" it, right? But how to attach a log (file as I understand)? > Please, help, as I want to be constructor rather than destructor :) > > Tomek > First, have you read http://gambasdoc.org/help/howto/svn?v3 ? If you didn't, please read it first, and then I will answer all your questions. :-) -- Beno?t Minisini From tommyline at ...674... Mon Aug 1 14:09:09 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Mon, 1 Aug 2011 13:09:09 +0100 (IST) Subject: [Gambas-devel] GLSL language In-Reply-To: <201108011355.32412.gambas@...1...> Message-ID: <8915813.2924.1312200549775.JavaMail.root@...675...> Well, I wrote my mail AFTER I read it. So again, as I understand: -Download, change code. -Write Log file in Gedit. (this is the most uncertain part , file with what name?) -Setup $EDITOR variable. -Then "svn commit" What else? Benoit, please help. Tomek. ----- Original Message ----- From: "Beno?t Minisini" To: "mailing list for gambas developers" Sent: Monday, 1 August, 2011 12:55:32 PM Subject: Re: [Gambas-devel] GLSL language > Forgive me my ignorance, but I'm confused with the way of making changes to > subversion. I'm just cautious and don't want to mess up things. > > As I understand, I have to download latest subversion, alter it and then > "svn commit" it, right? But how to attach a log (file as I understand)? > Please, help, as I want to be constructor rather than destructor :) > > Tomek > First, have you read http://gambasdoc.org/help/howto/svn?v3 ? If you didn't, please read it first, and then I will answer all your questions. :-) -- Beno?t Minisini ------------------------------------------------------------------------------ Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey _______________________________________________ Gambas-devel mailing list Gambas-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-devel From gambas at ...1... Mon Aug 1 14:15:11 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 1 Aug 2011 14:15:11 +0200 Subject: [Gambas-devel] GLSL language In-Reply-To: <8915813.2924.1312200549775.JavaMail.root@...675...> References: <8915813.2924.1312200549775.JavaMail.root@...675...> Message-ID: <201108011415.11501.gambas@...1...> > Well, I wrote my mail AFTER I read it. > So again, as I understand: > -Download, change code. Yes. > -Write Log file in Gedit. (this is the most uncertain part , file with what > name?) -Setup $EDITOR variable. > -Then "svn commit" 'svn commit' will run the editor specified by the contents of the $EDITOR environment variable. (on KDE, I chose kwrite). Then you will enter your changelog, save the file, close the editor. Then 'svn commit' will continue its job. Is it clearer? -- Beno?t Minisini From tommyline at ...674... Mon Aug 1 15:05:13 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Mon, 1 Aug 2011 14:05:13 +0100 (IST) Subject: [Gambas-devel] GLSL language In-Reply-To: <201108011415.11501.gambas@...1...> Message-ID: <24853365.3419.1312203913392.JavaMail.root@...675...> It's much clearer now, thanks, just one more question. after downloading with $ svn checkout https://gambas.svn.sourceforge.net/svnroot/gambas/gambas/trunk/ $ svn commit with the same attributes ? (https://gambas.svn.sourceforge.net/svnroot/gambas/gambas/trunk/) Tomek ----- Original Message ----- From: "Beno?t Minisini" To: "mailing list for gambas developers" Sent: Monday, 1 August, 2011 1:15:11 PM Subject: Re: [Gambas-devel] GLSL language > Well, I wrote my mail AFTER I read it. > So again, as I understand: > -Download, change code. Yes. > -Write Log file in Gedit. (this is the most uncertain part , file with what > name?) -Setup $EDITOR variable. > -Then "svn commit" 'svn commit' will run the editor specified by the contents of the $EDITOR environment variable. (on KDE, I chose kwrite). Then you will enter your changelog, save the file, close the editor. Then 'svn commit' will continue its job. Is it clearer? -- Beno?t Minisini ------------------------------------------------------------------------------ Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey _______________________________________________ Gambas-devel mailing list Gambas-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-devel From tommyline at ...674... Mon Aug 1 16:47:34 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Mon, 1 Aug 2011 15:47:34 +0100 (IST) Subject: [Gambas-devel] GLSL language In-Reply-To: <201108011415.11501.gambas@...1...> Message-ID: <900942.4705.1312210054258.JavaMail.root@...675...> Hi Benoit. I was partially expecting this to happen, I followed the steps and sent two updates, but it only copied main GL.c and Makefile.am files and didn't send added parts of the library. So the repository won't compile without them now. What to do? I feel like an ape with the razor :) Tomek. From gambas at ...1... Mon Aug 1 17:09:51 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 1 Aug 2011 17:09:51 +0200 Subject: [Gambas-devel] GLSL language In-Reply-To: <900942.4705.1312210054258.JavaMail.root@...675...> References: <900942.4705.1312210054258.JavaMail.root@...675...> Message-ID: <201108011709.51193.gambas@...1...> > Hi Benoit. > I was partially expecting this to happen, I followed the steps and sent two > updates, but it only copied main GL.c and Makefile.am files and didn't > send added parts of the library. So the repository won't compile without > them now. What to do? I feel like an ape with the razor :) > > Tomek. > Mmm... You didn't *really* read the "how to deal with subversion" wiki page. :-) I quote: "No automatic project structure tracking You must tell subversion if you add, delete, rename or move a file. You do that with the commands: * 'svn add' to add a file you have already created. * 'svn del' to remove a file. * 'svn move' to rename or move a file. Forgetting to use svn add is a common mistake. I know what I'm talking about :-)" Regards, -- Beno?t Minisini From ron at ...572... Mon Aug 1 16:51:42 2011 From: ron at ...572... (Ron) Date: Mon, 01 Aug 2011 16:51:42 +0200 Subject: [Gambas-devel] GLSL language In-Reply-To: <900942.4705.1312210054258.JavaMail.root@...675...> References: <201108011415.11501.gambas@...1...> <900942.4705.1312210054258.JavaMail.root@...675...> Message-ID: <4E36BD7E.3050507@...572...> On maandag 1 augustus 2011 16:47:34, tommyline at ...674... wrote: > Hi Benoit. > I was partially expecting this to happen, I followed the steps and sent two updates, but it only copied main GL.c and Makefile.am files and didn't send added parts of the library. > So the repository won't compile without them now. What to do? I feel like an ape with the razor :) > > Tomek. > > ------------------------------------------------------------------------------ > Got Input? Slashdot Needs You. > Take our quick survey online. Come on, we don't ask for help often. > Plus, you'll get a chance to win $100 to spend on ThinkGeek. > http://p.sf.net/sfu/slashdot-survey > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel Just do 'svn add ' for each file (or wildcard) and 'svn commit' again. Regards, Ron_2nd. From tommyline at ...674... Mon Aug 1 17:44:45 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Mon, 1 Aug 2011 16:44:45 +0100 (IST) Subject: [Gambas-devel] GLSL language In-Reply-To: <4E36BD7E.3050507@...572...> Message-ID: <19657056.5250.1312213485034.JavaMail.root@...675...> Hi Ron, Thanks for your help, it worked. :) Regards, Tomek. ----- Original Message ----- From: "Ron" To: gambas-devel at lists.sourceforge.net Sent: Monday, 1 August, 2011 3:51:42 PM Subject: Re: [Gambas-devel] GLSL language On maandag 1 augustus 2011 16:47:34, tommyline at ...674... wrote: > Hi Benoit. > I was partially expecting this to happen, I followed the steps and sent two updates, but it only copied main GL.c and Makefile.am files and didn't send added parts of the library. > So the repository won't compile without them now. What to do? I feel like an ape with the razor :) > > Tomek. > > ------------------------------------------------------------------------------ > Got Input? Slashdot Needs You. > Take our quick survey online. Come on, we don't ask for help often. > Plus, you'll get a chance to win $100 to spend on ThinkGeek. > http://p.sf.net/sfu/slashdot-survey > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel Just do 'svn add ' for each file (or wildcard) and 'svn commit' again. Regards, Ron_2nd. ------------------------------------------------------------------------------ Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey _______________________________________________ Gambas-devel mailing list Gambas-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-devel From gambas at ...1... Mon Aug 1 18:52:24 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 1 Aug 2011 18:52:24 +0200 Subject: [Gambas-devel] A few comment about Tommy's changes Message-ID: <201108011852.24350.gambas@...1...> Tommy: I looked at your commits, and I have the following comments: 1) The name of function arguments must start with an uppercase. Instead of writing that: GB_STATIC_METHOD("BeginCurve", NULL, GLUBEGINCURVE, "(nurb)p"), You must write: GB_STATIC_METHOD("BeginCurve", NULL, GLUBEGINCURVE, "(Nurb)p"), 2) You cannot use the "Pointer" datatype for that. It makes using an interpreter useless. As soon as you have a C datatype that you can create, delete, copy... you must implement a Gambas class to manage it. I saw 'GluQuadric *', but maybe you used some other datatypes, did you? 3) You used GB_OBJECT to receive a GB_POINTER. If it works, it's just because you had luck. 4) If you receive a Gambas array as an argument (or any other Gambas object), you must check that you didn't receive a NULL reference. There is an interpreter API for that, 'GB.CheckObject'. Instead of doing something like that: BEGIN_METHOD(GLVERTEXATTRIB4FV, GB_INTEGER index; GB_OBJECT v) GB_ARRAY fArray = VARG(v); int count = GB.Array.Count(fArray); int fill = count%4 ? (4-(count%4)) : 0; if (!count) return; You must do that: BEGIN_METHOD(GLVERTEXATTRIB4FV, GB_INTEGER index; GB_OBJECT v) GB_ARRAY fArray = VARG(v); int count, fill; if (GB.CheckObject(fArray)) return; count = GB.Array.Count(fArray); if (!count) return; fill = count%4 ? (4-(count%4)) : 0; The biggest change you must do is the implementation of a Gambas class to manage 'GluQuadric *'. Regards, -- Beno?t Minisini From tommyline at ...674... Mon Aug 1 20:21:29 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Mon, 1 Aug 2011 19:21:29 +0100 (IST) Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108011852.24350.gambas@...1...> Message-ID: <20041726.6762.1312222889630.JavaMail.root@...675...> Benoit, Thanks for correcting my errors. I'm working on point 1 and 4, it's not so difficult, but if you could explain me why shouldn't I use pointer (point 2) if it works, and what to use instead? The same with point 3, as I wrote some time ago, I'm not a good C programmer, I'm still learning. And after I clean up my code, I promise not to mess anymore ;) Tomek. ----- Original Message ----- From: "Beno?t Minisini" To: gambas-devel at lists.sourceforge.net Sent: Monday, 1 August, 2011 5:52:24 PM Subject: [Gambas-devel] A few comment about Tommy's changes Tommy: I looked at your commits, and I have the following comments: 1) The name of function arguments must start with an uppercase. Instead of writing that: GB_STATIC_METHOD("BeginCurve", NULL, GLUBEGINCURVE, "(nurb)p"), You must write: GB_STATIC_METHOD("BeginCurve", NULL, GLUBEGINCURVE, "(Nurb)p"), 2) You cannot use the "Pointer" datatype for that. It makes using an interpreter useless. As soon as you have a C datatype that you can create, delete, copy... you must implement a Gambas class to manage it. I saw 'GluQuadric *', but maybe you used some other datatypes, did you? 3) You used GB_OBJECT to receive a GB_POINTER. If it works, it's just because you had luck. 4) If you receive a Gambas array as an argument (or any other Gambas object), you must check that you didn't receive a NULL reference. There is an interpreter API for that, 'GB.CheckObject'. Instead of doing something like that: BEGIN_METHOD(GLVERTEXATTRIB4FV, GB_INTEGER index; GB_OBJECT v) GB_ARRAY fArray = VARG(v); int count = GB.Array.Count(fArray); int fill = count%4 ? (4-(count%4)) : 0; if (!count) return; You must do that: BEGIN_METHOD(GLVERTEXATTRIB4FV, GB_INTEGER index; GB_OBJECT v) GB_ARRAY fArray = VARG(v); int count, fill; if (GB.CheckObject(fArray)) return; count = GB.Array.Count(fArray); if (!count) return; fill = count%4 ? (4-(count%4)) : 0; The biggest change you must do is the implementation of a Gambas class to manage 'GluQuadric *'. Regards, -- Beno?t Minisini ------------------------------------------------------------------------------ Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey _______________________________________________ Gambas-devel mailing list Gambas-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-devel From kevinfishburne at ...590... Mon Aug 1 21:09:01 2011 From: kevinfishburne at ...590... (Kevin Fishburne) Date: Mon, 01 Aug 2011 15:09:01 -0400 Subject: [Gambas-devel] GLSL language In-Reply-To: <31950446.1177.1312191131847.JavaMail.root@...675...> References: <31950446.1177.1312191131847.JavaMail.root@...675...> Message-ID: <4E36F9CD.5090703@...590...> On 08/01/2011 05:32 AM, tommyline at ...674... wrote: > 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. Hey Tomek, welcome back. I see that you've jumped full into the fire on commits to the OpenGL components. That is great news and I'm pretty excited about it. Funny how things work out sometimes. I have about 50% of my program actually working in OpenGL now (harder than I thought), and just as I realized there are some missing functions I see your svn commits adding functions. Though often cruel, sometimes fate is kind. :) -- Kevin Fishburne Eight Virtues www: http://sales.eightvirtues.com e-mail: sales at ...590... phone: (770) 853-6271 From gambas at ...1... Mon Aug 1 21:11:02 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 1 Aug 2011 21:11:02 +0200 Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <20041726.6762.1312222889630.JavaMail.root@...675...> References: <20041726.6762.1312222889630.JavaMail.root@...675...> Message-ID: <201108012111.02410.gambas@...1...> > Benoit, > Thanks for correcting my errors. > I'm working on point 1 and 4, it's not so difficult, but if you could > explain me why shouldn't I use pointer (point 2) if it works, and what to > use instead? The same with point 3, as I wrote some time ago, I'm not a > good C programmer, I'm still learning. And after I clean up my code, I > promise not to mess anymore ;) > > Tomek. > Pointer can points at any memory address. By assuming that they are pointing to a GluQuadric, you can make crash the interpreter, or worse make it doing random things just by using a random pointer. THIS IS BAD! Let's take GluQuadric as an example: 1) You must create a Gambas class to manage it. Let's keep the same name, GluQuadric. 2) Look at the source code of the 'Rect' class, and use it as a template. 'Rect' is defined in /trunk/main/lib/draw/crect.c and /trunk/main/lib/draw/crect.h. So you should create a 'cgluquadric.c' and a 'cgluquadric.h' file. I added a "c" in front of the file name to remember that these files implement a Gambas class. 3) The Gambas GluQuadric object is defined by a C structure that always starts with a GB_BASE field. All Gambas objects are structure that begins with that structure. GB_BASE includes a pointer to the object class and the object reference count. typedef struct { GB_BASE ob; GluQuadric *quadric; } CGLUQUADRIC; 4) Contrary to the 'Rect' class, you cannot create a 'GluQuadric' from scratch (afaik). So you must add the GB_NOT_CREATABLE() keyword in the GB_DESC class description. GB_DESC GluQuadricDesc[] = { GB_DECLARE("GluQuadric", sizeof(CRECT)), GB_NOT_CREATABLE(), // No _new method is needed I think ... GB_END_DECLARE }; 5) But you will add a public C function in the gluquadric.c file that will create a GluQuadric Gambas object from a 'GluQuadric *' C pointer, as returned by the 'gluNewQuadric' OpenGL function. CGLUQUADRIC *GLUQUADRIC_create(GluQuadric *quadric) { CGLUQUADRIC *ob = GB.New(GB.FindClass("GluQuadric"), NULL, NULL); ob->quadric = quadric; return ob; } 6) Then you will implement GLUNEWQUADRIC that way: #include "cgluquadric.h" BEGIN_METHOD_VOID(GLUNEWQUADRIC) CGLUQUADRIC *ob = GLUQUADRIC_create(gluNewQuadric()); GB.ReturnObject(ob); END_METHOD 7) And you will declare it that way: GB_METHOD("NewQuadric", "GluQuadric", GLUNEWQUADRIC, NULL), 8) All other functions using GluQuadric must be modified, so that instead of taking a pointer, they take a GluQuadric Gambas object. Then the pointer you will receive in the function will be either NULL, either a pointer to a CGLUQUADRIC structure. From gambas at ...1... Mon Aug 1 21:14:13 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 1 Aug 2011 21:14:13 +0200 Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108012111.02410.gambas@...1...> References: <20041726.6762.1312222889630.JavaMail.root@...675...> <201108012111.02410.gambas@...1...> Message-ID: <201108012114.13876.gambas@...1...> > > Pointer can points at any memory address. By assuming that they are > pointing to a GluQuadric, you can make crash the interpreter, or worse > make it doing random things just by using a random pointer. THIS IS BAD! > My english too is bad, but hey... -- Beno?t Minisini From kevinfishburne at ...590... Mon Aug 1 21:28:48 2011 From: kevinfishburne at ...590... (Kevin Fishburne) Date: Mon, 01 Aug 2011 15:28:48 -0400 Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108012114.13876.gambas@...1...> References: <20041726.6762.1312222889630.JavaMail.root@...675...> <201108012111.02410.gambas@...1...> <201108012114.13876.gambas@...1...> Message-ID: <4E36FE70.50602@...590...> On 08/01/2011 03:14 PM, Beno?t Minisini wrote: >> Pointer can points at any memory address. By assuming that they are >> pointing to a GluQuadric, you can make crash the interpreter, or worse >> make it doing random things just by using a random pointer. THIS IS BAD! >> > My english too is bad, but hey... > Much better to have bad English than bad C. The mailing list is forgiving and grateful, gcc not so much, haha. Is there a FAQ on commit etiquette/convention? It might be good to have one. I just read this: http://gambasdoc.org/help/howto/svn and it has great information, just nothing on GAMBAS's logic, conventions, structure, etc. that would help someone jumping in to GAMBAS development for the first time. -- Kevin Fishburne Eight Virtues www: http://sales.eightvirtues.com e-mail: sales at ...590... phone: (770) 853-6271 From tommyline at ...674... Mon Aug 1 21:47:15 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Mon, 1 Aug 2011 20:47:15 +0100 (IST) Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108012114.13876.gambas@...1...> Message-ID: <28450890.7648.1312228035053.JavaMail.root@...675...> Benoit, I will try to implement your way, but I think much better in the morning, so I'll let you know tomorrow how it's going. Tomek. ----- Original Message ----- From: Beno?t Minisini To: mailing list for gambas developers Sent: Mon, 01 Aug 2011 20:14:13 +0100 (IST) Subject: Re: [Gambas-devel] A few comment about Tommy's changes > > Pointer can points at any memory address. By assuming that they are > pointing to a GluQuadric, you can make crash the interpreter, or worse > make it doing random things just by using a random pointer. THIS IS BAD! > My english too is bad, but hey... -- Beno?t Minisini ------------------------------------------------------------------------------ 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 From gambas at ...1... Mon Aug 1 22:16:56 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 1 Aug 2011 22:16:56 +0200 Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <28450890.7648.1312228035053.JavaMail.root@...675...> References: <28450890.7648.1312228035053.JavaMail.root@...675...> Message-ID: <201108012216.56243.gambas@...1...> > Benoit, I will try to implement your way, but I think much better in the > morning, so I'll let you know tomorrow how it's going. > > Tomek. No problem. Here is some other comments: 1) I found another Gambas class to implement: one for 'GLUnurbsObj *' returned by gluNewNurbsRenderer(). 2) As for gluDeleteNurbsRenderer() and gluDeleteQuadric(), you don't have to implement them explicitely, as Gambas objects are not freed explicitely by the user, but only there is no reference pointing at it anymore. Concretely, you have to remove the GLUDELETENURBSRENDERER and GLUDELETEQUADRIC methods. Instead, you will have to implement the "_free" special method in both classes. That method is called when a Gambas object is being freed. In that method, you will be able to call gluDeleteNurbsRenderer() or gluDeleteQuadric() to release the pointer stored in the Gambas object just before it dies and returns to the unmanifested world. -- Beno?t Minisini From tommyline at ...674... Tue Aug 2 10:21:32 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Tue, 2 Aug 2011 09:21:32 +0100 (IST) Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108012216.56243.gambas@...1...> Message-ID: <25618937.1315.1312273292246.JavaMail.root@...675...> Hi Benoit, I tried to implement gluQuadratic object, but compiler complains with: "In file included from GLUquadratic.c:26: cgluquadric.h:42: error: expected specifier-qualifier-list before ?GluQuadric? " cgluquadric.h file contains: #ifndef __CGLUQUADRIC_H #define __CGLUQUADRIC_H #include "gambas.h" #include "main.h" #include "GLU.h" // <==== I thought I should include path for Glu function? #ifndef __CGLUQUADRIC_C extern GB_DESC GluQuadricDesc[]; #else #define THIS OBJECT(CGLUQUADRIC) #endif typedef struct { GB_BASE ob; GluQuadric *quadric; // <==== this is line No 42. } CGLUQUADRIC; #endif cquadric.c contains: #define __CGLUQUADRATIC_C #include "gb_common.h" #include "cgluquadric.h" CGLUQUADRIC *CGLUQUADRIC_create(GluQuadric *quadric) { CGLUQUADRIC *ob = GB.New(GB.FindClass("GluQuadric"), NULL, NULL); ob->quadric = quadric; return ob; } GB_DESC GluQuadricDesc[] = { GB_DECLARE("GluQuadric", sizeof(CGLUQUADRIC)), GB_NOT_CREATABLE(), GB_END_DECLARE }; As I told you, I think much better in the morning, and just after I woke up I realised why the pointer is not good. It's the difference between user thinking and developer thinking - You just don't have control at what people put in the code :). If I know what to do, it doesn't mean everybody does. Learning all the time. So if you could help me with the code... ----- Original Message ----- From: "Beno?t Minisini" To: "mailing list for gambas developers" Sent: Monday, 1 August, 2011 9:16:56 PM Subject: Re: [Gambas-devel] A few comment about Tommy's changes > Benoit, I will try to implement your way, but I think much better in the > morning, so I'll let you know tomorrow how it's going. > > Tomek. No problem. Here is some other comments: 1) I found another Gambas class to implement: one for 'GLUnurbsObj *' returned by gluNewNurbsRenderer(). 2) As for gluDeleteNurbsRenderer() and gluDeleteQuadric(), you don't have to implement them explicitely, as Gambas objects are not freed explicitely by the user, but only there is no reference pointing at it anymore. Concretely, you have to remove the GLUDELETENURBSRENDERER and GLUDELETEQUADRIC methods. Instead, you will have to implement the "_free" special method in both classes. That method is called when a Gambas object is being freed. In that method, you will be able to call gluDeleteNurbsRenderer() or gluDeleteQuadric() to release the pointer stored in the Gambas object just before it dies and returns to the unmanifested world. -- Beno?t Minisini ------------------------------------------------------------------------------ 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 From gambas at ...1... Tue Aug 2 10:28:38 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 2 Aug 2011 10:28:38 +0200 Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <25618937.1315.1312273292246.JavaMail.root@...675...> References: <25618937.1315.1312273292246.JavaMail.root@...675...> Message-ID: <201108021028.38154.gambas@...1...> > Hi Benoit, > > I tried to implement gluQuadratic object, but compiler complains with: > > "In file included from GLUquadratic.c:26: > cgluquadric.h:42: error: expected specifier-qualifier-list before > ?GluQuadric? " > > > cgluquadric.h file contains: > > > #ifndef __CGLUQUADRIC_H > #define __CGLUQUADRIC_H > > #include "gambas.h" > #include "main.h" > #include "GLU.h" // <==== I thought I should include path for Glu > function? > > #ifndef __CGLUQUADRIC_C > extern GB_DESC GluQuadricDesc[]; > #else > > #define THIS OBJECT(CGLUQUADRIC) > > #endif > > typedef > struct { > GB_BASE ob; > GluQuadric *quadric; // <==== this is line No 42. > } > CGLUQUADRIC; > > #endif > > At first sight I see no error... Isn't 'GluQuadric' defined in 'GLU.h' ? -- Beno?t Minisini From tommyline at ...674... Tue Aug 2 10:35:16 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Tue, 2 Aug 2011 09:35:16 +0100 (IST) Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108021028.38154.gambas@...1...> Message-ID: <20919426.1500.1312274116598.JavaMail.root@...675...> Benoit, I found it, it's declared as GLUquadric, not GluQuadric. it compiles ok. Time to clean up the rest of the code now. ----- Original Message ----- From: "Beno?t Minisini" To: "mailing list for gambas developers" Sent: Tuesday, 2 August, 2011 9:28:38 AM Subject: Re: [Gambas-devel] A few comment about Tommy's changes > Hi Benoit, > > I tried to implement gluQuadratic object, but compiler complains with: > > "In file included from GLUquadratic.c:26: > cgluquadric.h:42: error: expected specifier-qualifier-list before > ?GluQuadric? " > > > cgluquadric.h file contains: > > > #ifndef __CGLUQUADRIC_H > #define __CGLUQUADRIC_H > > #include "gambas.h" > #include "main.h" > #include "GLU.h" // <==== I thought I should include path for Glu > function? > > #ifndef __CGLUQUADRIC_C > extern GB_DESC GluQuadricDesc[]; > #else > > #define THIS OBJECT(CGLUQUADRIC) > > #endif > > typedef > struct { > GB_BASE ob; > GluQuadric *quadric; // <==== this is line No 42. > } > CGLUQUADRIC; > > #endif > > At first sight I see no error... Isn't 'GluQuadric' defined in 'GLU.h' ? -- Beno?t Minisini ------------------------------------------------------------------------------ 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 From tommyline at ...674... Tue Aug 2 10:53:03 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Tue, 2 Aug 2011 09:53:03 +0100 (IST) Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108021028.38154.gambas@...1...> Message-ID: <831817.1953.1312275183566.JavaMail.root@...675...> First test returns error 127 when calling quadric = glu.NewQuadric() I would be grateful for the error code list. Tomek From gambas at ...1... Tue Aug 2 10:58:12 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 2 Aug 2011 10:58:12 +0200 Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <831817.1953.1312275183566.JavaMail.root@...675...> References: <831817.1953.1312275183566.JavaMail.root@...675...> Message-ID: <201108021058.13007.gambas@...1...> > First test returns error 127 when calling > quadric = glu.NewQuadric() > I would be grateful for the error code list. > Tomek > What are you talking about exactly? -- Beno?t Minisini From tommyline at ...674... Tue Aug 2 11:31:46 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Tue, 2 Aug 2011 10:31:46 +0100 (IST) Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108021058.13007.gambas@...1...> Message-ID: <28309199.2548.1312277506068.JavaMail.root@...675...> After applying changes to quadratics, I tried to test if it works in the program,, but first call to glu.NewQuadric() stops program and returns code 127. I'm stuck in there. Is there a list of return value meaning (error code list?). It could help in finding what's wrong. ----- Original Message ----- From: "Beno?t Minisini" To: "mailing list for gambas developers" Sent: Tuesday, 2 August, 2011 9:58:12 AM Subject: Re: [Gambas-devel] A few comment about Tommy's changes > First test returns error 127 when calling > quadric = glu.NewQuadric() > I would be grateful for the error code list. > Tomek > What are you talking about exactly? -- Beno?t Minisini ------------------------------------------------------------------------------ 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 From gambas at ...1... Tue Aug 2 11:39:17 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 2 Aug 2011 11:39:17 +0200 Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <28309199.2548.1312277506068.JavaMail.root@...675...> References: <28309199.2548.1312277506068.JavaMail.root@...675...> Message-ID: <201108021139.17137.gambas@...1...> > After applying changes to quadratics, I tried to test if it works in the > program,, but first call to glu.NewQuadric() stops program and returns > code 127. I'm stuck in there. > Is there a list of return value meaning (error code list?). It could help > in finding what's wrong. > Don't you have any message printed in the terminal? -- Beno?t Minisini From tommyline at ...674... Tue Aug 2 12:36:55 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Tue, 2 Aug 2011 11:36:55 +0100 (IST) Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108021139.17137.gambas@...1...> Message-ID: <30467309.4089.1312281415766.JavaMail.root@...675...> UPS! There is :|. I'm just loosing my head. 26_Clipping_Stencil: symbol lookup error: /usr/local/lib/gambas3/gb.opengl.glu.so: undefined symbol: GLUQUADRIC_create I just noticed the warning in the compiler output: GLUquadratic.c: In function ?GLUNEWQUADRIC?: GLUquadratic.c:33: warning: implicit declaration of function ?GLUQUADRIC_create? GLUquadratic.c:33: warning: initialization makes pointer from integer without a cast It may be that. To be honest, it all makes me feel less and less confident of what I'm doing. I'm sorry for the mess. Tomek. ----- Original Message ----- From: "Beno?t Minisini" To: "mailing list for gambas developers" Sent: Tuesday, 2 August, 2011 10:39:17 AM Subject: Re: [Gambas-devel] A few comment about Tommy's changes > After applying changes to quadratics, I tried to test if it works in the > program,, but first call to glu.NewQuadric() stops program and returns > code 127. I'm stuck in there. > Is there a list of return value meaning (error code list?). It could help > in finding what's wrong. > Don't you have any message printed in the terminal? -- Beno?t Minisini ------------------------------------------------------------------------------ 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 From gambas at ...1... Tue Aug 2 12:47:26 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 2 Aug 2011 12:47:26 +0200 Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <30467309.4089.1312281415766.JavaMail.root@...675...> References: <30467309.4089.1312281415766.JavaMail.root@...675...> Message-ID: <201108021247.26382.gambas@...1...> > UPS! There is :|. I'm just loosing my head. > > 26_Clipping_Stencil: symbol lookup error: > /usr/local/lib/gambas3/gb.opengl.glu.so: undefined symbol: > GLUQUADRIC_create > > I just noticed the warning in the compiler output: > > GLUquadratic.c: In function ?GLUNEWQUADRIC?: > GLUquadratic.c:33: warning: implicit declaration of function > ?GLUQUADRIC_create? GLUquadratic.c:33: warning: initialization makes > pointer from integer without a cast > > It may be that. > > To be honest, it all makes me feel less and less confident of what I'm > doing. I'm sorry for the mess. > > Tomek. > Don't worry, you are just learning. :-) You must declare GLUQUADRIC_create in the cgluquadric.h file. An undefined symbol in the compile shared library means that you forgot adding 'cgluquadric.c' and 'cgluquadric.h' to the Makefile.am file. (It can mean that you made a typo mistake too). After adding files to 'Makefile.am', you usually have to do a "./reconf && ./configure" in the "src/opengl" directory to regenerate the real 'Makefile' files. (Sometimes it is done automatically, but I am never sure). Regards, -- Beno?t Minisini From gambas at ...1... Tue Aug 2 12:53:53 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 2 Aug 2011 12:53:53 +0200 Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108021247.26382.gambas@...1...> References: <30467309.4089.1312281415766.JavaMail.root@...675...> <201108021247.26382.gambas@...1...> Message-ID: <201108021253.53674.gambas@...1...> > > GLUquadratic.c: In function ?GLUNEWQUADRIC?: > > GLUquadratic.c:33: warning: implicit declaration of function > > ?GLUQUADRIC_create? GLUquadratic.c:33: warning: initialization makes > > pointer from integer without a cast > > Note that each time you see that warning ("xxxx makes yyyy from zzzz without a cast"), it usually means that there is an error in your code. -- Beno?t Minisini From tommyline at ...674... Tue Aug 2 14:52:55 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Tue, 2 Aug 2011 13:52:55 +0100 (IST) Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108021253.53674.gambas@...1...> Message-ID: <7522924.6552.1312289575893.JavaMail.root@...675...> Benoit, I've managed to clean up the compiler errors, so it should work... Should, as I got the most awful error #11 segfault. I'm trying to write or reach to the memory I shouldn't... But where? I feel bad not for having problems, but for taking your precious time to help me solve them. Tomek. ----- Original Message ----- From: "Beno?t Minisini" To: "mailing list for gambas developers" Sent: Tuesday, 2 August, 2011 11:53:53 AM Subject: Re: [Gambas-devel] A few comment about Tommy's changes > > GLUquadratic.c: In function ?GLUNEWQUADRIC?: > > GLUquadratic.c:33: warning: implicit declaration of function > > ?GLUQUADRIC_create? GLUquadratic.c:33: warning: initialization makes > > pointer from integer without a cast > > Note that each time you see that warning ("xxxx makes yyyy from zzzz without a cast"), it usually means that there is an error in your code. -- Beno?t Minisini ------------------------------------------------------------------------------ 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 From gambas at ...1... Tue Aug 2 16:30:12 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Tue, 2 Aug 2011 16:30:12 +0200 Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <7522924.6552.1312289575893.JavaMail.root@...675...> References: <7522924.6552.1312289575893.JavaMail.root@...675...> Message-ID: <201108021630.12139.gambas@...1...> > Benoit, > I've managed to clean up the compiler errors, so it should work... Should, > as I got the most awful error #11 segfault. I'm trying to write or reach > to the memory I shouldn't... But where? I feel bad not for having > problems, but for taking your precious time to help me solve them. > > Tomek. > Now you have to learn how to debug with gdb or valgrind, two tools that will tell you (most of the time) where the segfault comes from. "segfault" is not an awful error. It is usually the most easier error to fix. Please read the "Reporting a problem" page on the web site at http://gambas.sf.net (The same page is in the wiki too). It will tell you how to get a stack backtrace with gdb of your error. But before, you must compile the component without optimizations. To do that: $ make clean $ make "CFLAGS=-O0 -g" "CXXFLAGS=-O0 -g" The 'make' arguments override the compilation flags. To compile again with optimizations: $ make clean $ make Regards, -- Beno?t Minisini From tommyline at ...674... Tue Aug 2 17:26:30 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Tue, 2 Aug 2011 16:26:30 +0100 (IST) Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108021630.12139.gambas@...1...> Message-ID: <19403096.9239.1312298790283.JavaMail.root@...675...> Benoit, I attach valgrind.out file. I hope you would guide me through this maze. And thank you for your help, I really appreciate it. Tomek. ----- Original Message ----- From: Beno?t Minisini To: mailing list for gambas developers Sent: Tue, 02 Aug 2011 15:30:12 +0100 (IST) Subject: Re: [Gambas-devel] A few comment about Tommy's changes Now you have to learn how to debug with gdb or valgrind, two tools that will tell you (most of the time) where the segfault comes from. "segfault" is not an awful error. It is usually the most easier error to fix. Please read the "Reporting a problem" page on the web site at http://gambas.sf.net (The same page is in the wiki too). It will tell you how to get a stack backtrace with gdb of your error. But before, you must compile the component without optimizations. To do that: $ make clean $ make "CFLAGS=-O0 -g" "CXXFLAGS=-O0 -g" The 'make' arguments override the compilation flags. To compile again with optimizations: $ make clean $ make Regards, -- Beno?t Minisini ------------------------------------------------------------------------------ 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: valgrind.out Type: application/octet-stream Size: 7579 bytes Desc: not available URL: From lordheavym at ...176... Wed Aug 3 09:00:41 2011 From: lordheavym at ...176... (Laurent Carlier) Date: Wed, 03 Aug 2011 09:00:41 +0200 Subject: [Gambas-devel] GLSL language In-Reply-To: <31950446.1177.1312191131847.JavaMail.root@...675...> References: <31950446.1177.1312191131847.JavaMail.root@...675...> Message-ID: <2463750.DKFz1iLRB1@...676...> 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 :-) ++ From lordheavym at ...176... Wed Aug 3 09:22:19 2011 From: lordheavym at ...176... (Laurent Carlier) Date: Wed, 03 Aug 2011 09:22:19 +0200 Subject: [Gambas-devel] GLSL language In-Reply-To: <2463750.DKFz1iLRB1@...676...> References: <31950446.1177.1312191131847.JavaMail.root@...675...> <2463750.DKFz1iLRB1@...676...> Message-ID: <1739766.Se0XLdknUh@...676...> 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. ++ From tommyline at ...674... Wed Aug 3 09:30:50 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Wed, 3 Aug 2011 08:30:50 +0100 (IST) Subject: [Gambas-devel] GLSL language In-Reply-To: <1739766.Se0XLdknUh@...676...> Message-ID: <12157545.743.1312356650168.JavaMail.root@...675...> 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" To: "mailing list for gambas developers" 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: cgluquadric.h Type: text/x-chdr Size: 1431 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: GLUquadratic.c Type: text/x-csrc Size: 2660 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: GLU.c Type: text/x-csrc Size: 4066 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: quadric.tar Type: application/x-tar Size: 7526 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: valgrind.out Type: application/octet-stream Size: 6083 bytes Desc: not available URL: From gambas at ...1... Thu Aug 4 15:25:32 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 4 Aug 2011 15:25:32 +0200 Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108021630.12139.gambas@...1...> References: <7522924.6552.1312289575893.JavaMail.root@...675...> <201108021630.12139.gambas@...1...> Message-ID: <201108041525.32438.gambas@...1...> > > Benoit, > > I've managed to clean up the compiler errors, so it should work... > > Should, as I got the most awful error #11 segfault. I'm trying to write > > or reach to the memory I shouldn't... But where? I feel bad not for > > having problems, but for taking your precious time to help me solve > > them. > > > > Tomek. > > Now you have to learn how to debug with gdb or valgrind, two tools that > will tell you (most of the time) where the segfault comes from. > > ... Did you succeed in finding where you made the mistake? -- Beno?t Minisini From tommyline at ...674... Thu Aug 4 17:44:33 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Thu, 4 Aug 2011 16:44:33 +0100 (IST) Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108041525.32438.gambas@...1...> Message-ID: <8438320.9390.1312472673009.JavaMail.root@...675...> Hi Benoit, I wish I did. >From the Valgrind output I can see the problem started while creating new class in gbx_object.c at 0x423D12: OBJECT_new (gbx_object.c:57) ==29609== by 0x423E05: OBJECT_create (gbx_object.c:395) ==29609== by 0xD4BAAC0: CGLUQUADRIC_create (cgluquadric.c:31) ==29609== by 0xD4BAA80: GLUNEWQUADRIC (GLUquadratic.c:33) I was trying to understand it, but I just can't. I sent all the files to devel list yesterday, maybe you can figure out what's wrong. I'm too little fish in that pond yet :( Regards, Tomek. ----- Original Message ----- From: "Beno?t Minisini" To: "mailing list for gambas developers" Sent: Thursday, 4 August, 2011 2:25:32 PM Subject: Re: [Gambas-devel] A few comment about Tommy's changes > > Benoit, > > I've managed to clean up the compiler errors, so it should work... > > Should, as I got the most awful error #11 segfault. I'm trying to write > > or reach to the memory I shouldn't... But where? I feel bad not for > > having problems, but for taking your precious time to help me solve > > them. > > > > Tomek. > > Now you have to learn how to debug with gdb or valgrind, two tools that > will tell you (most of the time) where the segfault comes from. > > ... Did you succeed in finding where you made the mistake? -- Beno?t Minisini ------------------------------------------------------------------------------ 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 From gambas at ...1... Thu Aug 4 17:47:17 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Thu, 4 Aug 2011 17:47:17 +0200 Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <8438320.9390.1312472673009.JavaMail.root@...675...> References: <8438320.9390.1312472673009.JavaMail.root@...675...> Message-ID: <201108041747.17659.gambas@...1...> > Hi Benoit, > I wish I did. > From the Valgrind output I can see the problem started while creating new > class in gbx_object.c at 0x423D12: OBJECT_new (gbx_object.c:57) > ==29609== by 0x423E05: OBJECT_create (gbx_object.c:395) > ==29609== by 0xD4BAAC0: CGLUQUADRIC_create (cgluquadric.c:31) > ==29609== by 0xD4BAA80: GLUNEWQUADRIC (GLUquadratic.c:33) > I was trying to understand it, but I just can't. > I sent all the files to devel list yesterday, maybe you can figure out > what's wrong. I'm too little fish in that pond yet :( > > Regards, > Tomek. > Valgrind tells you that something is wrong in cgluquadric.c at line 31 (provided that the Gambas inner functions work, but they should). And I didn't see your files anywhere. -- Beno?t Minisini From tommyline at ...674... Thu Aug 4 17:55:24 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Thu, 4 Aug 2011 16:55:24 +0100 (IST) Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108041747.17659.gambas@...1...> Message-ID: <24982655.9590.1312473324842.JavaMail.root@...675...> I'm sorry, I didn't realise , they are in the last reply to the "GLSL Language" topic, not in "A few comments..." Tomek ----- Original Message ----- From: "Beno?t Minisini" To: "mailing list for gambas developers" Sent: Thursday, 4 August, 2011 4:47:17 PM Subject: Re: [Gambas-devel] A few comment about Tommy's changes > Hi Benoit, > I wish I did. > From the Valgrind output I can see the problem started while creating new > class in gbx_object.c at 0x423D12: OBJECT_new (gbx_object.c:57) > ==29609== by 0x423E05: OBJECT_create (gbx_object.c:395) > ==29609== by 0xD4BAAC0: CGLUQUADRIC_create (cgluquadric.c:31) > ==29609== by 0xD4BAA80: GLUNEWQUADRIC (GLUquadratic.c:33) > I was trying to understand it, but I just can't. > I sent all the files to devel list yesterday, maybe you can figure out > what's wrong. I'm too little fish in that pond yet :( > > Regards, > Tomek. > Valgrind tells you that something is wrong in cgluquadric.c at line 31 (provided that the Gambas inner functions work, but they should). And I didn't see your files anywhere. -- Beno?t Minisini ------------------------------------------------------------------------------ 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 From tommyline at ...674... Thu Aug 4 23:16:34 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Thu, 4 Aug 2011 22:16:34 +0100 (IST) Subject: [Gambas-devel] just bin case you missed it In-Reply-To: <12157545.743.1312356650168.JavaMail.root@...675...> Message-ID: <2295610.13656.1312492594580.JavaMail.root@...675...> Hi Benoit. Just in case you missed it, I send these files again. Tomek. -------------- next part -------------- A non-text attachment was scrubbed... Name: cgluquadric.c Type: text/x-csrc Size: 1846 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cgluquadric.h Type: text/x-chdr Size: 1431 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: GLUquadratic.c Type: text/x-csrc Size: 2660 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: GLU.c Type: text/x-csrc Size: 4066 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: quadric.tar Type: application/x-tar Size: 7526 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: valgrind.out Type: application/octet-stream Size: 6083 bytes Desc: not available URL: From gambas at ...1... Fri Aug 5 00:23:02 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 5 Aug 2011 00:23:02 +0200 Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <24982655.9590.1312473324842.JavaMail.root@...675...> References: <24982655.9590.1312473324842.JavaMail.root@...675...> Message-ID: <201108050023.02806.gambas@...1...> > I'm sorry, I didn't realise , they are in the last reply to the "GLSL > Language" topic, not in "A few comments..." > > Tomek > Sorry, but I really do not see any recent post from you with the files attached. Why don't you commit them so that I can fix them? -- Beno?t Minisini From tommyline at ...674... Fri Aug 5 08:30:30 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Fri, 5 Aug 2011 07:30:30 +0100 (IST) Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108050023.02806.gambas@...1...> Message-ID: <697684.427.1312525830426.JavaMail.root@...675...> Hi Benoit, That's strange, because I can see all my posts in the Devel archive. They just are attached to the other post. I wanted to test the quadric part and be sure it works, before do the nurbs too, but if you want me to I can really do the upload, just wanted to save you time. If you could confirm that you got this mail, I will commit the changes. Regards, Tomek. ----- Original Message ----- From: "Beno?t Minisini" To: "mailing list for gambas developers" Sent: Thursday, 4 August, 2011 11:23:02 PM Subject: Re: [Gambas-devel] A few comment about Tommy's changes > I'm sorry, I didn't realise , they are in the last reply to the "GLSL > Language" topic, not in "A few comments..." > > Tomek > Sorry, but I really do not see any recent post from you with the files attached. Why don't you commit them so that I can fix them? -- Beno?t Minisini ------------------------------------------------------------------------------ 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 From kevinfishburne at ...590... Fri Aug 5 08:41:38 2011 From: kevinfishburne at ...590... (Kevin Fishburne) Date: Fri, 05 Aug 2011 02:41:38 -0400 Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <697684.427.1312525830426.JavaMail.root@...675...> References: <697684.427.1312525830426.JavaMail.root@...675...> Message-ID: <4E3B90A2.7040404@...590...> On 08/05/2011 02:30 AM, tommyline at ...674... wrote: > Hi Benoit, > That's strange, because I can see all my posts in the Devel archive. They just are attached to the other post. I wanted to test the quadric part and be sure it works, before do the nurbs too, > but if you want me to I can really do the upload, just wanted to save you time. If you could confirm that you got this mail, I will commit the changes. I got the mail, so it is going out to the list. I've been getting your other ones too (that I know of). I'm out of my depth in trying to help you add new stuff to gb3, but I should tell you that I'm extremely excited to see you expanding its OpenGL support. I'm cheering you on, and if there is anything I can do to help (making sure the revisions compile, testing the functions) I will. Keep up the awesome work. I have a feeling that once you get the first routine right, the next will be a lot easier. -- Kevin Fishburne Eight Virtues www: http://sales.eightvirtues.com e-mail: sales at ...590... phone: (770) 853-6271 From tommyline at ...674... Fri Aug 5 12:06:43 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Fri, 5 Aug 2011 11:06:43 +0100 (IST) Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108050023.02806.gambas@...1...> Message-ID: <796577.3067.1312538803576.JavaMail.root@...675...> Benoit, I've uploaded changes to SVN, I hope you won't get a heart attack after you see it ;) It seems like there are some communication problems, Kevin Fishburne wrote he could see my posts on Devel-List. Tomek. From gambas at ...1... Fri Aug 5 12:58:18 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 5 Aug 2011 12:58:18 +0200 Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <796577.3067.1312538803576.JavaMail.root@...675...> References: <796577.3067.1312538803576.JavaMail.root@...675...> Message-ID: <201108051258.18594.gambas@...1...> > Benoit, > > I've uploaded changes to SVN, I hope you won't get a heart attack after you > see it ;) It seems like there are some communication problems, Kevin > Fishburne wrote he could see my posts on Devel-List. > > Tomek. > I see them too, but I didn't see the post with the sources. Maybe gmail put them in spam, I will check... -- Beno?t Minisini From ron at ...572... Fri Aug 5 16:45:17 2011 From: ron at ...572... (Ron) Date: Fri, 05 Aug 2011 16:45:17 +0200 Subject: [Gambas-devel] Compiling project and create executable from script Message-ID: <4E3C01FD.9000803@...572...> Hi community, Is it possible to use gbc2 and alike tools to create a executable from a project from the command line? This will make it easier to automate thses steps for my svn project. Thanks. Regards, Ron_2nd. From gambas at ...1... Fri Aug 5 19:00:13 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 5 Aug 2011 19:00:13 +0200 Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <796577.3067.1312538803576.JavaMail.root@...675...> References: <796577.3067.1312538803576.JavaMail.root@...675...> Message-ID: <201108051900.13281.gambas@...1...> > Benoit, > > I've uploaded changes to SVN, I hope you won't get a heart attack after you > see it ;) It seems like there are some communication problems, Kevin > Fishburne wrote he could see my posts on Devel-List. > > Tomek. > I added some missing ';' in method signatures. Can you check the result? Do you have some opengl project that crashed before so that I can test? -- Beno?t Minisini From gambas at ...1... Fri Aug 5 19:35:13 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 5 Aug 2011 19:35:13 +0200 Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108051900.13281.gambas@...1...> References: <796577.3067.1312538803576.JavaMail.root@...675...> <201108051900.13281.gambas@...1...> Message-ID: <201108051935.13973.gambas@...1...> > > Benoit, > > > > I've uploaded changes to SVN, I hope you won't get a heart attack after > > you see it ;) It seems like there are some communication problems, Kevin > > Fishburne wrote he could see my posts on Devel-List. > > > > Tomek. > > I added some missing ';' in method signatures. Can you check the result? > > Do you have some opengl project that crashed before so that I can test? And each time you receive a Gambas object reference as argument of a method, you have to check it with GB.CheckObject(). Unless you accept that the reference can be null. Example: BEGIN_METHOD(GLUQUADRICTEXTURE, GB_OBJECT Quad; GB_BOOLEAN Texture) GLUquadric *quad = VARG(Quad); if (GB.CheckObject(quad)) return; gluQuadricTexture(quad, VARG(Texture)); END_METHOD -- Beno?t Minisini From tommyline at ...674... Fri Aug 5 19:37:21 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Fri, 5 Aug 2011 18:37:21 +0100 (IST) Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108051900.13281.gambas@...1...> Message-ID: <17993866.10044.1312565841205.JavaMail.root@...675...> Still crashes :( This is the simplest project that uses quadrics, let me know if it is visible. The file is called quadric.tar. Tomek. -------------- next part -------------- A non-text attachment was scrubbed... Name: quadric.tar Type: application/x-tar Size: 7526 bytes Desc: not available URL: From gambas at ...1... Fri Aug 5 19:43:46 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 5 Aug 2011 19:43:46 +0200 Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <17993866.10044.1312565841205.JavaMail.root@...675...> References: <17993866.10044.1312565841205.JavaMail.root@...675...> Message-ID: <201108051943.46242.gambas@...1...> > Still crashes :( > This is the simplest project that uses quadrics, let me know if it is > visible. The file is called quadric.tar. Tomek. You have an menu entry in the IDE that create a *.tar.gz of your project for you. -- Beno?t Minisini From tommyline at ...674... Fri Aug 5 19:49:03 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Fri, 5 Aug 2011 18:49:03 +0100 (IST) Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108051935.13973.gambas@...1...> Message-ID: <16716943.10153.1312566543280.JavaMail.root@...675...> I'm applying gb.CheckObject to quad functions. In the example I sent just replace pointer with object in quad declaration. Tomek. From tommyline at ...674... Fri Aug 5 19:51:26 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Fri, 5 Aug 2011 18:51:26 +0100 (IST) Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108051943.46242.gambas@...1...> Message-ID: <24698078.10174.1312566686760.JavaMail.root@...675...> This is version created by IDE, as you told me, Thanks. Tomek -------------- next part -------------- A non-text attachment was scrubbed... Name: quadric-0.0.1.tar.gz Type: application/x-compressed-tar Size: 6686 bytes Desc: not available URL: From tommyline at ...674... Fri Aug 5 22:17:13 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Fri, 5 Aug 2011 21:17:13 +0100 (IST) Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108051943.46242.gambas@...1...> Message-ID: <22790927.11503.1312575433783.JavaMail.root@...675...> Benoit, Did you get my project? It now gets through the glu.NewQuadric() and creates GluQuadric object, but: -It gets segfault with glu.QuadricNormals and glu.QuadricTextures -It doesn't crash with glu.Sphere, .Cylinder and .Disk but there's nothing produced on screen. The question is what exactly is passed as GluQuadric to the functions, as they work ok with pointer : gluQuadricTexture (GLUquadric* quad, GLboolean texture); and if the command: GLUquadric *quad = VARG(Quad); passes pointer to quad. Tomek. From gambas at ...1... Fri Aug 5 22:33:05 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Fri, 5 Aug 2011 22:33:05 +0200 Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <22790927.11503.1312575433783.JavaMail.root@...675...> References: <22790927.11503.1312575433783.JavaMail.root@...675...> Message-ID: <201108052233.05986.gambas@...1...> > Benoit, > Did you get my project? > It now gets through the glu.NewQuadric() and creates GluQuadric object, > but: -It gets segfault with glu.QuadricNormals and glu.QuadricTextures > -It doesn't crash with glu.Sphere, .Cylinder and .Disk but there's nothing > produced on screen. The question is what exactly is passed as GluQuadric > to the functions, as they work ok with pointer : > > gluQuadricTexture (GLUquadric* quad, GLboolean texture); > > and if the command: > > GLUquadric *quad = VARG(Quad); > > passes pointer to quad. > > Tomek. > Of course: VARG(Quad) returns the pointer to the Gambas object, not the pointer to the 'GLUquadric *' object. You must: 1) Use GB.CheckObject() to ensure that you don't receive a NULL reference. 2) Use ((CGLUQUADRIC *)VARG(Quad))->quadric to get the 'GLUquadric *' pointer. Now let's talk about "object oriented programming". You should centralize all functions related to quadric inside the same source file. For example 'cgluquadric.c'. Because they are related. Moreover, you can transform the GluQuadric class into a "true" class with methods. In other words, instead of doing: glu.QuadricNormals(quadric, gl.GL_SMOOTH) The Gambas user will do something like that: quadric.Normals(gl.GL_SMOOTH). To do that, you will all corresponding methods to the GluQuadric Gambas class. Of course, this does not look like normal OpenGL GLU programming, but it is real object oriented programming. And you can have both. You can: - Keep the old GLU.xxx(quadric, yyy) functions. - Add equivalent GluQuadric.xxx(yyy) methods. The first Gambas methods is implemented by the DECLARE_METHOD(GLUxxx, GB_OBJECT quadric; yyy) function. Wheread the second Gambas method will be implemented in the GluQuadric class by: DECLARE_METHOD(GluQuadric_xxx, yyy) Of course, if you are a good developer, both functions will share their code. Tell me if you want me to make an example of that. Regards, -- Beno?t Minisini From tommyline at ...674... Fri Aug 5 23:12:37 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Fri, 5 Aug 2011 22:12:37 +0100 (IST) Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108052233.05986.gambas@...1...> Message-ID: <159504.11910.1312578757456.JavaMail.root@...675...> This sounds promising, Benoit, I was thinking about hiding as much of the sensitive points as possible from the user, This way we can do all the pointer related operations inside the class without the user interference. It all gives me a big headache, I tried to implement changes to nurbs too, but it works awkwardly. And of course I need any help you can give me, with as many examples as possible. By the way, did you make my project work? I can't. Tomek. ----- Original Message ----- From: "Beno?t Minisini" To: "mailing list for gambas developers" Sent: Friday, 5 August, 2011 9:33:05 PM Subject: Re: [Gambas-devel] A few comment about Tommy's changes > Benoit, > Did you get my project? > It now gets through the glu.NewQuadric() and creates GluQuadric object, > but: -It gets segfault with glu.QuadricNormals and glu.QuadricTextures > -It doesn't crash with glu.Sphere, .Cylinder and .Disk but there's nothing > produced on screen. The question is what exactly is passed as GluQuadric > to the functions, as they work ok with pointer : > > gluQuadricTexture (GLUquadric* quad, GLboolean texture); > > and if the command: > > GLUquadric *quad = VARG(Quad); > > passes pointer to quad. > > Tomek. > Of course: VARG(Quad) returns the pointer to the Gambas object, not the pointer to the 'GLUquadric *' object. You must: 1) Use GB.CheckObject() to ensure that you don't receive a NULL reference. 2) Use ((CGLUQUADRIC *)VARG(Quad))->quadric to get the 'GLUquadric *' pointer. Now let's talk about "object oriented programming". You should centralize all functions related to quadric inside the same source file. For example 'cgluquadric.c'. Because they are related. Moreover, you can transform the GluQuadric class into a "true" class with methods. In other words, instead of doing: glu.QuadricNormals(quadric, gl.GL_SMOOTH) The Gambas user will do something like that: quadric.Normals(gl.GL_SMOOTH). To do that, you will all corresponding methods to the GluQuadric Gambas class. Of course, this does not look like normal OpenGL GLU programming, but it is real object oriented programming. And you can have both. You can: - Keep the old GLU.xxx(quadric, yyy) functions. - Add equivalent GluQuadric.xxx(yyy) methods. The first Gambas methods is implemented by the DECLARE_METHOD(GLUxxx, GB_OBJECT quadric; yyy) function. Wheread the second Gambas method will be implemented in the GluQuadric class by: DECLARE_METHOD(GluQuadric_xxx, yyy) Of course, if you are a good developer, both functions will share their code. Tell me if you want me to make an example of that. Regards, -- Beno?t Minisini ------------------------------------------------------------------------------ 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 From tommyline at ...674... Sat Aug 6 00:12:44 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Fri, 5 Aug 2011 23:12:44 +0100 (IST) Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108052233.05986.gambas@...1...> Message-ID: <13312981.12339.1312582364117.JavaMail.root@...675...> Benoit! Finally got it working. :) The key was the ((CGLUQUADRIC *)VARG(Quad))->quadric instead of VARG(Quad). SVN updated. Attach project for nurbs. Finally quiet night :)))) Tomek. -------------- next part -------------- A non-text attachment was scrubbed... Name: Nurbs-0.0.2.tar.gz Type: application/x-compressed-tar Size: 55348 bytes Desc: not available URL: From tommyline at ...674... Sat Aug 6 08:27:52 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Sat, 6 Aug 2011 07:27:52 +0100 (IST) Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108052233.05986.gambas@...1...> Message-ID: <30879057.394.1312612072168.JavaMail.root@...675...> Hi Benoit, What a lovely surprise. Great job. I just wonder how long did it take you to fix (an hour, less maybe) something, I was fighting for three days :). That's the level of may C knowledge, so I'll better stick to making projects and eventually sending some requests about missing functions (it doesn't mean I don't want to learn, I just see I push too much on your side :) ). Do you sleep at all? ;) Tomek. From gambas at ...1... Sat Aug 6 12:57:18 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sat, 6 Aug 2011 12:57:18 +0200 Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <30879057.394.1312612072168.JavaMail.root@...675...> References: <30879057.394.1312612072168.JavaMail.root@...675...> Message-ID: <201108061257.18749.gambas@...1...> > Hi Benoit, > What a lovely surprise. Great job. > I just wonder how long did it take you to fix (an hour, less maybe) > something, I was fighting for three days :). That's the level of may C > knowledge, so I'll better stick to making projects and eventually sending > some requests about missing functions (it doesn't mean I don't want to > learn, I just see I push too much on your side :) ). Do you sleep at all? > ;) > > Tomek. > I made that, because I think it is faster than explaining everything with words. Tell me if you have any questions about my changes. The aim being that you understand them so that you can add other functions or classes more easily now! I suggest you add all needed methods to the GluQuadric and GluNurb classes as I told you in a previous mail, so that the user can do either Glu.QuadricNormals(quad, normal) or quad.Normals(normal) and so on. I removed the word "Quadric" from the method name, because it is redondant. If you have a function (it is an example, I don't know if it is true) named Glu.QuadricNormals() that apply a parameter to the quadric, and another function that returns the applied value, you can make a property instead of a method. Otherwise, note that your example completely freezes my machine after running during a few seconds. I guess the 'nouveau' driver crashed. Regards, -- Beno?t Minisini From tommyline at ...674... Sat Aug 6 13:47:53 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Sat, 6 Aug 2011 12:47:53 +0100 (IST) Subject: [Gambas-devel] A few comment about Tommy's changes In-Reply-To: <201108061257.18749.gambas@...1...> Message-ID: <17636644.1982.1312631273670.JavaMail.root@...675...> For the moment all quads and nurbs necessary are implemented, I suppose new required functions will pop up as needed. I will surely stud all the code to understand how it works. There is one little problem with 2D evaluators now. The project that was working with version from some 2+ months ago, doesn't produce the surface anymore, while 1D curves are produced ok. I attach both Bezier Map and Bezier Curve projects for you to compare. I don't know what have changed, was it SDL or OpenGl. I was trying to find differences, but couldn't. Bezier map should produce surface similar to nurbs surface. Thanks for everything you did for me. Tomek. -------------- next part -------------- A non-text attachment was scrubbed... Name: bezcurve-0.0.1.tar.gz Type: application/x-compressed-tar Size: 7433 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bezmap-0.0.1.tar.gz Type: application/x-compressed-tar Size: 266718 bytes Desc: not available URL: From tommyline at ...674... Sun Aug 7 21:51:29 2011 From: tommyline at ...674... (tommyline at ...674...) Date: Sun, 7 Aug 2011 20:51:29 +0100 (IST) Subject: [Gambas-devel] [Gambas-devel-svn] SF.net SVN: gambas:[3985] gambas/trunk/gb.opengl/src/GL.c In-Reply-To: Message-ID: <9862307.5256.1312746689700.JavaMail.root@...675...> Hi Laurent, Make produces an error: GL.c: In function ?GL_unknown?: GL.c:81: error: ?GB_ERR_NSYMBOL? undeclared (first use in this function) GL.c:81: error: (Each undeclared identifier is reported only once GL.c:81: error: for each function it appears in.) GL.c:87: error: ?GB_ERR_NPROPERTY? undeclared (first use in this function) make[5]: *** [GL.lo] error 1 Regards, Tomek From lordheavym at ...176... Sun Aug 7 22:02:10 2011 From: lordheavym at ...176... (Laurent Carlier) Date: Sun, 07 Aug 2011 22:02:10 +0200 Subject: [Gambas-devel] [Gambas-devel-svn] SF.net SVN: gambas:[3985] gambas/trunk/gb.opengl/src/GL.c In-Reply-To: <9862307.5256.1312746689700.JavaMail.root@...675...> References: <9862307.5256.1312746689700.JavaMail.root@...675...> Message-ID: <1719771.0fcmIjTPg2@...676...> Le Dimanche 7 Ao?t 2011 20:51:29, tommyline at ...674... a ?crit : > Hi Laurent, > Make produces an error: > > GL.c: In function ?GL_unknown?: > GL.c:81: error: ?GB_ERR_NSYMBOL? undeclared (first use in this function) > GL.c:81: error: (Each undeclared identifier is reported only once > GL.c:81: error: for each function it appears in.) > GL.c:87: error: ?GB_ERR_NPROPERTY? undeclared (first use in this function) > make[5]: *** [GL.lo] error 1 > > Regards, > Tomek > > Already fixed, resync your tree. ++ From kevinfishburne at ...590... Mon Aug 29 20:48:20 2011 From: kevinfishburne at ...590... (Kevin Fishburne) Date: Mon, 29 Aug 2011 14:48:20 -0400 Subject: [Gambas-devel] potential for web-based, cross-platform GAMBAS applications Message-ID: <4E5BDEF4.8070602@...590...> I just caught this on Slashdot: http://blog.chromium.org/2011/08/native-client-brings-sandboxed-native.html Looks like it's still early on in development, but when it becomes more useful I think it has great potential. To summarize from the article: "Native Client apps live on the web platform, so you don?t need to create separate versions of your app for each operating system. Rather than relying on OS-specific APIs, Native Client apps use Pepper, a set of interfaces that provide C and C++ bindings to the capabilities of HTML5. This means that once you?ve ported your code to Native Client, it will work across different operating systems, and you only need to maintain one code base." If GAMBAS was made to work with it, any GAMBAS application could be run in a browser. As I said, it's not near finished, but I think an eye should be kept on it for the future. -- Kevin Fishburne Eight Virtues www: http://sales.eightvirtues.com e-mail: sales at ...590... phone: (770) 853-6271 From gambas at ...1... Mon Aug 29 21:11:51 2011 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 29 Aug 2011 21:11:51 +0200 Subject: [Gambas-devel] potential for web-based, cross-platform GAMBAS applications In-Reply-To: <4E5BDEF4.8070602@...590...> References: <4E5BDEF4.8070602@...590...> Message-ID: <201108292111.51488.gambas@...1...> > I just caught this on Slashdot: > > http://blog.chromium.org/2011/08/native-client-brings-sandboxed-native.html > > Looks like it's still early on in development, but when it becomes more > useful I think it has great potential. To summarize from the article: > > "Native Client apps live on the web platform, so you don?t need to > create separate versions of your app for each operating system. Rather > than relying on OS-specific APIs, Native Client apps use Pepper, a set > of interfaces that provide C and C++ bindings to the capabilities of > HTML5. This means that once you?ve ported your code to Native Client, it > will work across different operating systems, and you only need to > maintain one code base." > > If GAMBAS was made to work with it, any GAMBAS application could be run > in a browser. As I said, it's not near finished, but I think an eye > should be kept on it for the future. I hate that. They actually have the same goal than Microsoft : making their platform unavoidable. Moreover JavaScript is a mess, HTML5 is not finished, Mozilla wants to design "WebAPI"... I made Gambas just because of that. :-) Now, in a more constructive way, it's interesting :-). It's one more "in the wind" thing to do: 1) Compiling Gambas interpreter on Android and use the androit scripting server to make application. And now: 2) Making a "Pepper" component so that Gambas app can be run inside this GGG (google gilded guardian). -- Beno?t Minisini From kevinfishburne at ...590... Mon Aug 29 21:49:45 2011 From: kevinfishburne at ...590... (Kevin Fishburne) Date: Mon, 29 Aug 2011 15:49:45 -0400 Subject: [Gambas-devel] potential for web-based, cross-platform GAMBAS applications In-Reply-To: <201108292111.51488.gambas@...1...> References: <4E5BDEF4.8070602@...590...> <201108292111.51488.gambas@...1...> Message-ID: <4E5BED59.4030602@...590...> On 08/29/2011 03:11 PM, Beno?t Minisini wrote: >> I just caught this on Slashdot: >> >> http://blog.chromium.org/2011/08/native-client-brings-sandboxed-native.html >> >> Looks like it's still early on in development, but when it becomes more >> useful I think it has great potential. To summarize from the article: >> >> "Native Client apps live on the web platform, so you don?t need to >> create separate versions of your app for each operating system. Rather >> than relying on OS-specific APIs, Native Client apps use Pepper, a set >> of interfaces that provide C and C++ bindings to the capabilities of >> HTML5. This means that once you?ve ported your code to Native Client, it >> will work across different operating systems, and you only need to >> maintain one code base." >> >> If GAMBAS was made to work with it, any GAMBAS application could be run >> in a browser. As I said, it's not near finished, but I think an eye >> should be kept on it for the future. > I hate that. They actually have the same goal than Microsoft : making their > platform unavoidable. > > Moreover JavaScript is a mess, HTML5 is not finished, Mozilla wants to design > "WebAPI"... > > I made Gambas just because of that. :-) > > Now, in a more constructive way, it's interesting :-). It's one more "in the > wind" thing to do: > > 1) Compiling Gambas interpreter on Android and use the androit scripting > server to make application. > > And now: > > 2) Making a "Pepper" component so that Gambas app can be run inside this GGG > (google gilded guardian). > Hahahaa. Yeah, it would be nice if everyone got got together to create a real standard that didn't have "hidden agenda" plastered all over it. Just goes to show that "open source" and "common good" aren't always the same thing. Maybe a lesser of evils will emerge that will allow GAMBAS to be web-based and/or cross-platform. Something like a VirtualBox browser extension might work. -- Kevin Fishburne Eight Virtues www: http://sales.eightvirtues.com e-mail: sales at ...590... phone: (770) 853-6271 From sourceforge-raindog2 at ...19... Mon Aug 29 22:06:27 2011 From: sourceforge-raindog2 at ...19... (Rob) Date: Mon, 29 Aug 2011 16:06:27 -0400 Subject: [Gambas-devel] potential for web-based, cross-platform GAMBAS applications In-Reply-To: <4E5BDEF4.8070602@...590...> References: <4E5BDEF4.8070602@...590...> Message-ID: <201108291606.27274.sourceforge-raindog2@...19...> On Monday 29 August 2011 14:48, Kevin Fishburne wrote: > http://blog.chromium.org/2011/08/native-client-brings-sandboxed- native.html > If GAMBAS was made to work with it, any GAMBAS application could be run > in a browser. Well, "a browser" meaning Chrome, just like "a browser" with ActiveX and XBAP effectively meant Internet Exploder. I'm sure someone will write a Firefox plugin and I'm sure the market penetration of that plugin will easily reach 2 to 3% of the Firefox user base. Well, maybe more if they get free Angry Birds out of it, but they already can play Angry Birds in HTML5. Then you have the architecture issues (need ARM and x86 versions of your code, in this case the Gambas interpreter), and the same infrastructure issues you have with WebOS and Android, namely that there's no X server, so you need to write an X-less form component for Gambas and strip the X dependencies out of the other components. It might actually be easier to make a gb.gtk3 based on gb.gtk, and use the new Gtk3 HTML5 rendering back end: http://blogs.gnome.org/alexl/2010/11/23/gtk3-vs-html5/ It's about as mature as NaCl is (basically, not at all) but someday it might provide a nice migration path for Gtk apps, including those written in Gambas, and provide some interesting possibilities for hybrid web/desktop apps. Rob