From tommyline at ...674... Mon Mar 18 10:40:12 2013 From: tommyline at ...674... (tommyline at ...674...) Date: Mon, 18 Mar 2013 09:40:12 +0000 (GMT) Subject: [Gambas-devel] OpenGL component and more. In-Reply-To: <1256188964.16202.1363598138184.JavaMail.root@...674...> Message-ID: <521155354.17940.1363599612409.JavaMail.root@...674...> Hi Benoit, According to your suggestions, I write via devel list. >> I tried to epand my trunk to my needs as >> they arose. Then I decided to add some more interesting features >> which could increase performance. I thought, I'm the only one >> interested in OpenGL programming, but some people contacted me >> recently, and I realized that some of the features could be of use >> for them. I can't commit to SVN beacause my trunk is a real mess at >> the moment and I'm not totally sure if all I've done (I'm almost sure >> not) is done properly. If you could just read the rest of the letter >> and see the class I've attached. I would be really happy for any >> comments about it. >Hi, >Here is what I suggest. Tell me if you agree and/or if you have questions: Yes, I agree 100%. >1) Clean-up your local repository, so that you can commit safely. >Sending me source files so that I commit them for you will take my time >for something useless as you can do it directly! Get a sourceforge >account, and send it me so that I give you write access to the repository. Done. My sourceforge account is "tommyline". Do you need any more info? >2) If you want to do experiments, and use the subversion repository, you >can create your own branch in the /branches directory in the repository. >Once done, you can merge your changes to the /trunk. This is the biggest question mark. 1. I've noticesd some changes in commiting to subversion, but didn't put much attention to it, have to check archive for guidance, but I don't know how to operate on branches (or how to create ny own directory there). Would be gratefull for some advice. 2. If I wanted to add some opengl subcomponent (GLFW for instance), how can I do it properly? 3. I was thinking of md2model as a part of a game engine, so I tink it would be named as something like gb.sge (simple game engine - particle system to follow, rigid body to be developed etc.). Do you think it would be ok to create that component? >3) Apparently, your class can only be created by calling the Load() >method. So you must add "GB_NOT_CREATABLE()," inside the class >declaration so that the user cannot create a Md2Model with the NEW >instruction. Corrected. >4) You should follow the following convention for naming the >implementation of class methods or properties: > > + + > >i.e.: `Md2Model_Load` instead of `MD2LOAD`. It's more readable, and it's >the one I use now. Corrected too. >5) I don't know a lot of things about OpenGL, so don't hesitate to add >some comments to explain what you want to achieve. That way, it will be >easier for me to help you! Comments in class files, I can do that, but could you explain how to add documentation pages about new methods in new classes? >6) Please communicate through the developer mailing-list, so that >everything is archived and searchable. > >Regards, > >-- >Beno?t Minisini That's for the moment. Regards, Tomek "tommyline". From tommyline at ...674... Mon Mar 25 20:26:49 2013 From: tommyline at ...674... (tommyline at ...674...) Date: Mon, 25 Mar 2013 19:26:49 +0000 (GMT) Subject: [Gambas-devel] problems with new gb.sge (Simple Game Liobrary) component. In-Reply-To: <521155354.17940.1363599612409.JavaMail.root@...674...> Message-ID: <1673958863.70903.1364239609657.JavaMail.root@...674...> Hi Benoit, I was able to make new component and compile it, but can't test it. It's grey in component list as all experimental components, but IDE calls "component not found gb.sge". It doesn't show in reconf-all or configure too. I don't know what I do wrong, it seems not registered by Gambas. I attach .conf file from TEMPLATE dir. Thanks Tomek Kolodziejczyk. -------------- next part -------------- A non-text attachment was scrubbed... Name: gb.sge.conf Type: text/x-csrc Size: 1918 bytes Desc: not available URL: From gambas at ...1... Mon Mar 25 20:32:09 2013 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Mon, 25 Mar 2013 20:32:09 +0100 Subject: [Gambas-devel] problems with new gb.sge (Simple Game Liobrary) component. In-Reply-To: <1673958863.70903.1364239609657.JavaMail.root@...674...> References: <1673958863.70903.1364239609657.JavaMail.root@...674...> Message-ID: <5150A639.9010907@...1...> Le 25/03/2013 20:26, tommyline at ...674... a ?crit : > Hi Benoit, > > I was able to make new component and compile it, but can't test it. > It's grey in component list as all experimental components, but IDE > calls "component not found gb.sge". It doesn't show in reconf-all or > configure too. I don't know what I do wrong, it seems not registered > by Gambas. I attach .conf file from TEMPLATE dir. > > Thanks Tomek Kolodziejczyk. > > Of course, the template just creates the directory and some files. But all the autoconf/automake files must be modified by hand. Do you know how to use autoconf and automake? -- Beno?t Minisini From tommyline at ...674... Mon Mar 25 20:45:32 2013 From: tommyline at ...674... (tommyline at ...674...) Date: Mon, 25 Mar 2013 19:45:32 +0000 (GMT) Subject: [Gambas-devel] problems with new gb.sge (Simple Game Liobrary) component. In-Reply-To: <5150A639.9010907@...1...> Message-ID: <1095792742.74045.1364240732970.JavaMail.root@...674...> >From: "Beno?t Minisini" >To: "mailing list for gambas developers" >Sent: Monday, 25 March, 2013 7:32:09 PM >Subject: Re: [Gambas-devel] problems with new gb.sge (Simple Game Liobrary) component. > >Of course, the template just creates the directory and some files. But >all the autoconf/automake files must be modified by hand. > >Do you know how to use autoconf and automake? > >-- >Beno?t Minisini I was hoping it would be as easy as adding directory names to makefile.am and configure.ac but it didn't quite work, so I need help. Tomek From gambas at ...1... Mon Mar 25 20:52:42 2013 From: gambas at ...1... (=?UTF-8?B?QmVub8OudCBNaW5pc2luaQ==?=) Date: Mon, 25 Mar 2013 20:52:42 +0100 Subject: [Gambas-devel] problems with new gb.sge (Simple Game Liobrary) component. In-Reply-To: <1095792742.74045.1364240732970.JavaMail.root@...674...> References: <1095792742.74045.1364240732970.JavaMail.root@...674...> Message-ID: <5150AB0A.80308@...1...> Le 25/03/2013 20:45, tommyline at ...674... a ?crit : > > >> From: "Beno?t Minisini" >> To: "mailing list for gambas developers" >> Sent: Monday, 25 March, 2013 7:32:09 PM >> Subject: Re: [Gambas-devel] problems with new gb.sge (Simple Game Liobrary) component. >> >> Of course, the template just creates the directory and some files. But >> all the autoconf/automake files must be modified by hand. >> >> Do you know how to use autoconf and automake? >> >> -- >> Beno?t Minisini > > I was hoping it would be as easy as adding directory names to makefile.am and configure.ac but it didn't quite work, so I need help. > > Tomek > That's it. You must update the SUBDIRS variable in the root Makefile.am with the new component directory, and add a new GB_CONFIG_SUBDIR() macro to the 'configure.ac' file. Then you run "./reconf-all". -- Beno?t Minisini From tobias at ...692... Mon Mar 25 20:34:18 2013 From: tobias at ...692... (Tobias Boege) Date: Mon, 25 Mar 2013 20:34:18 +0100 Subject: [Gambas-devel] problems with new gb.sge (Simple Game Liobrary) component. In-Reply-To: <1673958863.70903.1364239609657.JavaMail.root@...674...> References: <521155354.17940.1363599612409.JavaMail.root@...674...> <1673958863.70903.1364239609657.JavaMail.root@...674...> Message-ID: <20130325193418.GD505@...693...> On Mon, 25 Mar 2013, tommyline at ...674... wrote: > Hi Benoit, > > I was able to make new component and compile it, but can't test it. It's grey in component list as all experimental components, but IDE calls "component not found gb.sge". It doesn't show in reconf-all or configure too. I don't know what I do wrong, it seems not registered by Gambas. I attach .conf file from TEMPLATE dir. > Look at the two top-level files: - Makefile.am: Add your @sge_dir@ line to SUBDIRS - configure.ac: Add your GB_CONFIG_SUBDIRS line Then $ ./reconf-all && ./configure && make # make install But how did you make it show up in the IDE dialogs without installing it properly? Regards, Tobi From tommyline at ...674... Mon Mar 25 23:02:49 2013 From: tommyline at ...674... (tommyline at ...674...) Date: Mon, 25 Mar 2013 22:02:49 +0000 (GMT) Subject: [Gambas-devel] problems with new gb.sge (Simple Game Liobrary) component. In-Reply-To: <5150A639.9010907@...1...> Message-ID: <1894348223.100906.1364248969285.JavaMail.root@...674...> Ok, got it. Now I have to comment example and attach it too, then I'll try to commit it. Tomek. ----- Original Message ----- From: "Beno?t Minisini" To: "mailing list for gambas developers" Sent: Monday, 25 March, 2013 7:32:09 PM Subject: Re: [Gambas-devel] problems with new gb.sge (Simple Game Liobrary) component. Le 25/03/2013 20:26, tommyline at ...674... a ?crit : > Hi Benoit, > > I was able to make new component and compile it, but can't test it. > It's grey in component list as all experimental components, but IDE > calls "component not found gb.sge". It doesn't show in reconf-all or > configure too. I don't know what I do wrong, it seems not registered > by Gambas. I attach .conf file from TEMPLATE dir. > > Thanks Tomek Kolodziejczyk. > > Of course, the template just creates the directory and some files. But all the autoconf/automake files must be modified by hand. Do you know how to use autoconf and automake? -- Beno?t Minisini ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ Gambas-devel mailing list Gambas-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-devel From gambas at ...1... Tue Mar 26 13:55:14 2013 From: gambas at ...1... (=?UTF-8?B?QmVub8OudCBNaW5pc2luaQ==?=) Date: Tue, 26 Mar 2013 13:55:14 +0100 Subject: [Gambas-devel] problems with new gb.sge (Simple Game Liobrary) component. In-Reply-To: <1894348223.100906.1364248969285.JavaMail.root@...674...> References: <1894348223.100906.1364248969285.JavaMail.root@...674...> Message-ID: <51519AB2.1010100@...1...> Le 25/03/2013 23:02, tommyline at ...674... a ?crit : > Ok, got it. Now I have to comment example and attach it too, then I'll try to commit it. > Tomek. > You must use "svn add" to insert new files or directories into the repository. *BUT* do not insert files that must not be inserted! In other words, do a "make clean" into "gb.sge" before adding it. By the way, as this is an OpenGL thing that depends on OpenGL, you must rename your component into "gb.opengl.sge"! Regards, -- Beno?t Minisini From tommyline at ...674... Tue Mar 26 13:59:26 2013 From: tommyline at ...674... (tommyline at ...674...) Date: Tue, 26 Mar 2013 12:59:26 +0000 (GMT) Subject: [Gambas-devel] problems with new gb.sge (Simple Game Liobrary) component. In-Reply-To: <51519AB2.1010100@...1...> Message-ID: <762980129.32509.1364302766387.JavaMail.root@...674...> If I change the name now, all I have to do is to change it in main makefile.am and configure.ac or make it from the begining? What will happen with the gb.sge I've already commited? ----- Original Message ----- From: "Beno?t Minisini" To: "mailing list for gambas developers" Sent: Tuesday, 26 March, 2013 12:55:14 PM Subject: Re: [Gambas-devel] problems with new gb.sge (Simple Game Liobrary) component. Le 25/03/2013 23:02, tommyline at ...674... a ?crit : > Ok, got it. Now I have to comment example and attach it too, then I'll try to commit it. > Tomek. > You must use "svn add" to insert new files or directories into the repository. *BUT* do not insert files that must not be inserted! In other words, do a "make clean" into "gb.sge" before adding it. By the way, as this is an OpenGL thing that depends on OpenGL, you must rename your component into "gb.opengl.sge"! Regards, -- Beno?t Minisini ------------------------------------------------------------------------------ Own the Future-Intel® Level Up Game Demo Contest 2013 Rise to greatness in Intel's independent game demo contest. Compete for recognition, cash, and the chance to get your game on Steam. $5K grand prize plus 10 genre and skill prizes. Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d _______________________________________________ Gambas-devel mailing list Gambas-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-devel From kevinfishburne at ...590... Wed Mar 27 07:52:14 2013 From: kevinfishburne at ...590... (Kevin Fishburne) Date: Wed, 27 Mar 2013 02:52:14 -0400 Subject: [Gambas-devel] problems with new gb.sge (Simple Game Liobrary) component. In-Reply-To: <762980129.32509.1364302766387.JavaMail.root@...674...> References: <762980129.32509.1364302766387.JavaMail.root@...674...> Message-ID: <5152971E.6010207@...590...> @Tomek Sorry to interject into the thread so rudely, but I'd like to say thanks for giving this some attention. With the coming of Valve's "Steambox" and the native Linux Steam client I think it's only a matter of time before GAMBAS proves itself a worthy language (with respect to compatible/available market share) for game development. Awesome effort and I'm proud of everyone here helping you jump the technical hurdles of implementing your component. -- Kevin Fishburne Eight Virtues www: http://sales.eightvirtues.com e-mail: sales at ...590... phone: (770) 853-6271 From tommyline at ...674... Wed Mar 27 08:31:31 2013 From: tommyline at ...674... (Tomek) Date: Wed, 27 Mar 2013 07:31:31 +0000 Subject: [Gambas-devel] problems with new gb.sge (Simple Game Liobrary) component. In-Reply-To: <5152971E.6010207@...590...> References: <762980129.32509.1364302766387.JavaMail.root@...674...> <5152971E.6010207@...590...> Message-ID: <5152A053.3050006@...674...> On 27.03.2013 06:52, Kevin Fishburne wrote: > @Tomek Sorry to interject into the thread so rudely, but I'd like to say > thanks for giving this some attention. With the coming of Valve's > "Steambox" and the native Linux Steam client I think it's only a matter > of time before GAMBAS proves itself a worthy language (with respect to > compatible/available market share) for game development. Awesome effort > and I'm proud of everyone here helping you jump the technical hurdles of > implementing your component. > Thank you, Kevin, it's very kind of you. Did you try Md2Model example? Could you tell me your FPS rate and GPU you're using? The same question applies to everyone that tries it. Thanks, Tomek. From gambas.fr at ...176... Wed Mar 27 08:37:08 2013 From: gambas.fr at ...176... (Fabien Bodard) Date: Wed, 27 Mar 2013 08:37:08 +0100 Subject: [Gambas-devel] problems with new gb.sge (Simple Game Liobrary) component. In-Reply-To: <5152971E.6010207@...590...> References: <762980129.32509.1364302766387.JavaMail.root@...674...> <5152971E.6010207@...590...> Message-ID: Yes thank you. We have some work done in the svn Gb.g3d... take a look in the exp branche. It is based on ogre. And have stuff done to load mesh in gambas archive. Take a look to blitzbasic and blitz3d for implementation ideas. But do not forget to stay in the object kiss Concept of gambas. We are here to remember you that. Le 27 mars 2013 07:52, "Kevin Fishburne" a ?crit : > @Tomek Sorry to interject into the thread so rudely, but I'd like to say > thanks for giving this some attention. With the coming of Valve's > "Steambox" and the native Linux Steam client I think it's only a matter > of time before GAMBAS proves itself a worthy language (with respect to > compatible/available market share) for game development. Awesome effort > and I'm proud of everyone here helping you jump the technical hurdles of > implementing your component. > > -- > Kevin Fishburne > Eight Virtues > www: http://sales.eightvirtues.com > e-mail: sales at ...590... > phone: (770) 853-6271 > > > > ------------------------------------------------------------------------------ > Own the Future-Intel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tommyline at ...674... Wed Mar 27 09:22:28 2013 From: tommyline at ...674... (Tomek) Date: Wed, 27 Mar 2013 08:22:28 +0000 Subject: [Gambas-devel] problems with new gb.sge (Simple Game Liobrary) component. In-Reply-To: References: <762980129.32509.1364302766387.JavaMail.root@...674...> <5152971E.6010207@...590...> Message-ID: <5152AC44.9040707@...674...> On 27.03.2013 07:37, Fabien Bodard wrote: > > Yes thank you. We have some work done in the svn > Gb.g3d... take a look in the exp branche. It is based on ogre. And > have stuff done to load mesh in gambas archive. > > Take a look to blitzbasic and blitz3d for implementation ideas. But do > not forget to stay in the object kiss Concept of gambas. We are here > to remember you that. > > Le 27 mars 2013 07:52, "Kevin Fishburne" > > a ?crit : > > @Tomek Sorry to interject into the thread so rudely, but I'd like > to say > thanks for giving this some attention. With the coming of Valve's > "Steambox" and the native Linux Steam client I think it's only a > matter > of time before GAMBAS proves itself a worthy language (with respect to > compatible/available market share) for game development. Awesome > effort > and I'm proud of everyone here helping you jump the technical > hurdles of > implementing your component. > > -- > Kevin Fishburne > Eight Virtues > www: http://sales.eightvirtues.com > e-mail: sales at ...590... > phone: (770) 853-6271 > > > ------------------------------------------------------------------------------ > Own the Future-Intel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-devel > > > > ------------------------------------------------------------------------------ > Own the Future-Intel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d > > > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel Hi Fabien, What I had in mind when started writing this, was pure simplicity, which means every class is independent of the world and can be used on its own. I tried Ogre, Ode, Irrlicht, and all of them seemed quite complicated to use. And I didn't know about your effort just until some few days ago. Is there any example of how to use gb.g3d engine? I have particle system implemented too, I will commit it as soon I'll update the names to match Benoit's syntax. Thank you Tomek Kolodziejczyk. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas.fr at ...176... Wed Mar 27 09:41:41 2013 From: gambas.fr at ...176... (Fabien Bodard) Date: Wed, 27 Mar 2013 09:41:41 +0100 Subject: [Gambas-devel] problems with new gb.sge (Simple Game Liobrary) component. In-Reply-To: <5152AC44.9040707@...674...> References: <762980129.32509.1364302766387.JavaMail.root@...674...> <5152971E.6010207@...590...> <5152AC44.9040707@...674...> Message-ID: I didn't say you must use engine such as ogre an independent one is better but long to do. Just keep in mind that the most of the game rendering and scene calculating must be done by your class... in C or c++ Le 27 mars 2013 09:22, "Tomek" a ?crit : > On 27.03.2013 07:37, Fabien Bodard wrote: > > Yes thank you. We have some work done in the svn > Gb.g3d... take a look in the exp branche. It is based on ogre. And have > stuff done to load mesh in gambas archive. > > Take a look to blitzbasic and blitz3d for implementation ideas. But do not > forget to stay in the object kiss Concept of gambas. We are here to > remember you that. > Le 27 mars 2013 07:52, "Kevin Fishburne" > a ?crit : > >> @Tomek Sorry to interject into the thread so rudely, but I'd like to say >> thanks for giving this some attention. With the coming of Valve's >> "Steambox" and the native Linux Steam client I think it's only a matter >> of time before GAMBAS proves itself a worthy language (with respect to >> compatible/available market share) for game development. Awesome effort >> and I'm proud of everyone here helping you jump the technical hurdles of >> implementing your component. >> >> -- >> Kevin Fishburne >> Eight Virtues >> www: http://sales.eightvirtues.com >> e-mail: sales at ...590... >> phone: (770) 853-6271 >> >> >> >> ------------------------------------------------------------------------------ >> Own the Future-Intel® Level Up Game Demo Contest 2013 >> Rise to greatness in Intel's independent game demo contest. >> Compete for recognition, cash, and the chance to get your game >> on Steam. $5K grand prize plus 10 genre and skill prizes. >> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d >> _______________________________________________ >> Gambas-devel mailing list >> Gambas-devel at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-devel >> > > > ------------------------------------------------------------------------------ > Own the Future-Intel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d > > > > _______________________________________________ > Gambas-devel mailing listGambas-devel at ...720...://lists.sourceforge.net/lists/listinfo/gambas-devel > > Hi Fabien, > What I had in mind when started writing this, was pure simplicity, which > means every class is independent of the world and can be used on its own. I > tried Ogre, Ode, Irrlicht, and all of them seemed quite complicated to use. > And I didn't know about your effort just until some few days ago. Is there > any example of how to use gb.g3d engine? > I have particle system implemented too, I will commit it as soon I'll > update the names to match Benoit's syntax. > > Thank you > Tomek Kolodziejczyk. > > > ------------------------------------------------------------------------------ > Own the Future-Intel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas at ...1... Wed Mar 27 09:55:59 2013 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Wed, 27 Mar 2013 09:55:59 +0100 Subject: [Gambas-devel] gb.opengl.gse : beware with svn log format! Message-ID: <5152B41F.9030505@...1...> Hi Tommy, Beware that you don't write your subversion log correctly. Only the r5590 was written with the right format. If you don't use the right format, I can't generate the changelog automatically from subversion log, and I have to fix it by hand, which is quite time consuming. If the log format is not clear for you, just tell me and I will explain it again. Regards, -- Beno?t Minisini From tommyline at ...674... Wed Mar 27 10:12:24 2013 From: tommyline at ...674... (Tomek) Date: Wed, 27 Mar 2013 09:12:24 +0000 Subject: [Gambas-devel] gb.opengl.gse : beware with svn log format! In-Reply-To: <5152B41F.9030505@...1...> References: <5152B41F.9030505@...1...> Message-ID: <5152B7F8.2020901@...674...> On 27.03.2013 08:55, Beno?t Minisini wrote: > Hi Tommy, > > Beware that you don't write your subversion log correctly. Only the > r5590 was written with the right format. > > If you don't use the right format, I can't generate the changelog > automatically from subversion log, and I have to fix it by hand, which > is quite time consuming. > > If the log format is not clear for you, just tell me and I will explain > it again. > > Regards, > Hi, I had some issues with svn complaining about not filled info but I passed it only once as I remember. Could you show me what was wrong? And if you can, please explain how should I do it. Thanks, Tommy. From gambas at ...1... Wed Mar 27 10:22:11 2013 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Wed, 27 Mar 2013 10:22:11 +0100 Subject: [Gambas-devel] gb.opengl.gse : beware with svn log format! In-Reply-To: <5152B7F8.2020901@...674...> References: <5152B41F.9030505@...1...> <5152B7F8.2020901@...674...> Message-ID: <5152BA43.6090208@...1...> Le 27/03/2013 10:12, Tomek a ?crit : > On 27.03.2013 08:55, Beno?t Minisini wrote: >> Hi Tommy, >> >> Beware that you don't write your subversion log correctly. Only the >> r5590 was written with the right format. >> >> If you don't use the right format, I can't generate the changelog >> automatically from subversion log, and I have to fix it by hand, which >> is quite time consuming. >> >> If the log format is not clear for you, just tell me and I will explain >> it again. >> >> Regards, >> > Hi, > I had some issues with svn complaining about not filled info but I > passed it only once as I remember. Could you show me what was wrong? And > if you can, please explain how should I do it. > > Thanks, > Tommy. > Good (r5590) : [GB.SGE] * NEW: New experimental component for simple OpenGL gaming engine. * NEW: Md2Model loader and renderer. [EXAMPLES] * NEW: Example to show how to use new Md2Model component. Bad (r5591) : [GB.SGE] * BUG Forgot to add files [EXAMPLES] * BUG Frogot to add... --> The ':' character after "BUG" is missing. Bad (r5594) : [GB.XML.HTML] * BUG: Does not crash anymore if the id or class properties does not exist when reading them. --> The line it too long. The length must be lower or equal than 76 characters. [GB.OPENGL] * NEW Added some new constants --> The ':' character after "NEW" is missing. Bad (r5594) : [EXAMPLES] *OPT Minor update to Md2Model Example --> There is a missing space before "OPT", and a missing ':' character after. You should define the EDITOR environment variable in your 'bashrc' file with the editor that will be used to enter the svn commit log. For example: $ cat ~/.bashrc ... export EDITOR=kwrite $ Regards, -- Beno?t Minisini From tommyline at ...674... Wed Mar 27 11:07:51 2013 From: tommyline at ...674... (Tomek) Date: Wed, 27 Mar 2013 10:07:51 +0000 Subject: [Gambas-devel] gb.opengl.gse : beware with svn log format! In-Reply-To: <5152BA43.6090208@...1...> References: <5152B41F.9030505@...1...> <5152B7F8.2020901@...674...> <5152BA43.6090208@...1...> Message-ID: <5152C4F7.2070003@...674...> On 27.03.2013 09:22, Beno?t Minisini wrote: > Le 27/03/2013 10:12, Tomek a ?crit : >> On 27.03.2013 08:55, Beno?t Minisini wrote: >>> Hi Tommy, >>> >>> Beware that you don't write your subversion log correctly. Only the >>> r5590 was written with the right format. >>> >>> If you don't use the right format, I can't generate the changelog >>> automatically from subversion log, and I have to fix it by hand, which >>> is quite time consuming. >>> >>> If the log format is not clear for you, just tell me and I will explain >>> it again. >>> >>> Regards, >>> >> Hi, >> I had some issues with svn complaining about not filled info but I >> passed it only once as I remember. Could you show me what was wrong? And >> if you can, please explain how should I do it. >> >> Thanks, >> Tommy. >> > Good (r5590) : > > [GB.SGE] > * NEW: New experimental component for simple OpenGL gaming engine. > * NEW: Md2Model loader and renderer. > > [EXAMPLES] > * NEW: Example to show how to use new Md2Model component. > > Bad (r5591) : > > [GB.SGE] > * BUG Forgot to add files > > [EXAMPLES] > * BUG Frogot to add... > > --> The ':' character after "BUG" is missing. > > Bad (r5594) : > > [GB.XML.HTML] > * BUG: Does not crash anymore if the id or class properties does not > exist when reading them. > > --> The line it too long. The length must be lower or equal than 76 > characters. > > [GB.OPENGL] > * NEW Added some new constants > > --> The ':' character after "NEW" is missing. > > Bad (r5594) : > > [EXAMPLES] > *OPT Minor update to Md2Model Example > > --> There is a missing space before "OPT", and a missing ':' character > after. > > You should define the EDITOR environment variable in your 'bashrc' file > with the editor that will be used to enter the svn commit log. > > For example: > > $ cat ~/.bashrc > ... > export EDITOR=kwrite > $ > > Regards, > Thank you Benoit, I didn't know the space was so important, and the : sign is my mistake, sorry. The strange thing was that svn was complaining AFTER i finished and saved the file in pluma (mint 13's gedit). But it was ok after i restarted computer, so it could be some bug in system. From gambas.fr at ...176... Wed Mar 27 23:09:37 2013 From: gambas.fr at ...176... (Fabien Bodard) Date: Wed, 27 Mar 2013 23:09:37 +0100 Subject: [Gambas-devel] problems with new gb.sge (Simple Game Liobrary) component. In-Reply-To: References: <762980129.32509.1364302766387.JavaMail.root@...674...> <5152971E.6010207@...590...> <5152AC44.9040707@...674...> Message-ID: I've try the example :-)... it work well ... 60 fps on my machine. I think you must to embed the init process in the screen class, to simplify the user work. ogre as new md2mesh ogre.loadtexture("path") ogre.addsequence("walk",0,100, 5000) (seqname, firstframe, lastframe, duration of the sequence in ms) public sub key_press if key.code = key.up then ogre.move(x,y,z) ogre.sequence = ogre["walk"] ogre.start endif end public sub screendraw ogre.draw endif an internal timer increase the frame and the interpolation . but we can imagine also some way to force on a choosen sequence frame ogre.stop ogre.frame=3 well this is just some ideas to simplify the api but not the better way lol it's just matter to think the opengl class must have to be used at less at possible :-). Good work ! 2013/3/27 Fabien Bodard > I didn't say you must use engine such as ogre an independent one is better > but long to do. > > Just keep in mind that the most of the game rendering and scene > calculating must be done by your class... in C or c++ > Le 27 mars 2013 09:22, "Tomek" a ?crit : > > On 27.03.2013 07:37, Fabien Bodard wrote: >> >> Yes thank you. We have some work done in the svn >> Gb.g3d... take a look in the exp branche. It is based on ogre. And have >> stuff done to load mesh in gambas archive. >> >> Take a look to blitzbasic and blitz3d for implementation ideas. But do >> not forget to stay in the object kiss Concept of gambas. We are here to >> remember you that. >> Le 27 mars 2013 07:52, "Kevin Fishburne" >> a ?crit : >> >>> @Tomek Sorry to interject into the thread so rudely, but I'd like to say >>> thanks for giving this some attention. With the coming of Valve's >>> "Steambox" and the native Linux Steam client I think it's only a matter >>> of time before GAMBAS proves itself a worthy language (with respect to >>> compatible/available market share) for game development. Awesome effort >>> and I'm proud of everyone here helping you jump the technical hurdles of >>> implementing your component. >>> >>> -- >>> Kevin Fishburne >>> Eight Virtues >>> www: http://sales.eightvirtues.com >>> e-mail: sales at ...590... >>> phone: (770) 853-6271 >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Own the Future-Intel® Level Up Game Demo Contest 2013 >>> Rise to greatness in Intel's independent game demo contest. >>> Compete for recognition, cash, and the chance to get your game >>> on Steam. $5K grand prize plus 10 genre and skill prizes. >>> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d >>> _______________________________________________ >>> Gambas-devel mailing list >>> Gambas-devel at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-devel >>> >> >> >> ------------------------------------------------------------------------------ >> Own the Future-Intel® Level Up Game Demo Contest 2013 >> Rise to greatness in Intel's independent game demo contest. >> Compete for recognition, cash, and the chance to get your game >> on Steam. $5K grand prize plus 10 genre and skill prizes. >> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d >> >> >> >> _______________________________________________ >> Gambas-devel mailing listGambas-devel at ...720...://lists.sourceforge.net/lists/listinfo/gambas-devel >> >> Hi Fabien, >> What I had in mind when started writing this, was pure simplicity, which >> means every class is independent of the world and can be used on its own. I >> tried Ogre, Ode, Irrlicht, and all of them seemed quite complicated to use. >> And I didn't know about your effort just until some few days ago. Is there >> any example of how to use gb.g3d engine? >> I have particle system implemented too, I will commit it as soon I'll >> update the names to match Benoit's syntax. >> >> Thank you >> Tomek Kolodziejczyk. >> >> >> ------------------------------------------------------------------------------ >> Own the Future-Intel® Level Up Game Demo Contest 2013 >> Rise to greatness in Intel's independent game demo contest. >> Compete for recognition, cash, and the chance to get your game >> on Steam. $5K grand prize plus 10 genre and skill prizes. >> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d >> _______________________________________________ >> Gambas-devel mailing list >> Gambas-devel at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-devel >> >> -- Fabien Bodard -------------- next part -------------- An HTML attachment was scrubbed... URL: From jussi.lahtinen at ...176... Thu Mar 28 01:13:17 2013 From: jussi.lahtinen at ...176... (Jussi Lahtinen) Date: Thu, 28 Mar 2013 02:13:17 +0200 Subject: [Gambas-devel] problems with new gb.sge (Simple Game Liobrary) component. In-Reply-To: References: <762980129.32509.1364302766387.JavaMail.root@...674...> <5152971E.6010207@...590...> <5152AC44.9040707@...674...> Message-ID: Umm... 15757 frames in 5,0 seconds = 3151,400 FPS And it made my computer to emit quiet high pitched noise, which I have never heard before. My video card is passively cooled, so it's not fan. Jussi On Thu, Mar 28, 2013 at 12:09 AM, Fabien Bodard wrote: > I've try the example :-)... it work well ... 60 fps on my machine. > > I think you must to embed the init process in the screen class, to > simplify the user work. > > > ogre as new md2mesh > > ogre.loadtexture("path") > > ogre.addsequence("walk",0,100, 5000) (seqname, firstframe, lastframe, > duration of the sequence in ms) > > > public sub key_press > if key.code = key.up then > ogre.move(x,y,z) > ogre.sequence = ogre["walk"] > ogre.start > endif > > end > > > public sub screendraw > > ogre.draw > > endif > > > an internal timer increase the frame and the interpolation . > > but we can imagine also some way to force on a choosen sequence frame > > ogre.stop > ogre.frame=3 > > > well this is just some ideas to simplify the api but not the better way > lol it's just matter to think > > the opengl class must have to be used at less at possible :-). > Good work ! > > > > > 2013/3/27 Fabien Bodard > >> I didn't say you must use engine such as ogre an independent one is >> better but long to do. >> >> Just keep in mind that the most of the game rendering and scene >> calculating must be done by your class... in C or c++ >> Le 27 mars 2013 09:22, "Tomek" a ?crit : >> >> On 27.03.2013 07:37, Fabien Bodard wrote: >>> >>> Yes thank you. We have some work done in the svn >>> Gb.g3d... take a look in the exp branche. It is based on ogre. And have >>> stuff done to load mesh in gambas archive. >>> >>> Take a look to blitzbasic and blitz3d for implementation ideas. But do >>> not forget to stay in the object kiss Concept of gambas. We are here to >>> remember you that. >>> Le 27 mars 2013 07:52, "Kevin Fishburne" < >>> kevinfishburne at ...590...> a ?crit : >>> >>>> @Tomek Sorry to interject into the thread so rudely, but I'd like to say >>>> thanks for giving this some attention. With the coming of Valve's >>>> "Steambox" and the native Linux Steam client I think it's only a matter >>>> of time before GAMBAS proves itself a worthy language (with respect to >>>> compatible/available market share) for game development. Awesome effort >>>> and I'm proud of everyone here helping you jump the technical hurdles of >>>> implementing your component. >>>> >>>> -- >>>> Kevin Fishburne >>>> Eight Virtues >>>> www: http://sales.eightvirtues.com >>>> e-mail: sales at ...590... >>>> phone: (770) 853-6271 >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Own the Future-Intel® Level Up Game Demo Contest 2013 >>>> Rise to greatness in Intel's independent game demo contest. >>>> Compete for recognition, cash, and the chance to get your game >>>> on Steam. $5K grand prize plus 10 genre and skill prizes. >>>> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d >>>> _______________________________________________ >>>> Gambas-devel mailing list >>>> Gambas-devel at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-devel >>>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Own the Future-Intel® Level Up Game Demo Contest 2013 >>> Rise to greatness in Intel's independent game demo contest. >>> Compete for recognition, cash, and the chance to get your game >>> on Steam. $5K grand prize plus 10 genre and skill prizes. >>> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d >>> >>> >>> >>> _______________________________________________ >>> Gambas-devel mailing listGambas-devel at ...720...://lists.sourceforge.net/lists/listinfo/gambas-devel >>> >>> Hi Fabien, >>> What I had in mind when started writing this, was pure simplicity, which >>> means every class is independent of the world and can be used on its own. I >>> tried Ogre, Ode, Irrlicht, and all of them seemed quite complicated to use. >>> And I didn't know about your effort just until some few days ago. Is there >>> any example of how to use gb.g3d engine? >>> I have particle system implemented too, I will commit it as soon I'll >>> update the names to match Benoit's syntax. >>> >>> Thank you >>> Tomek Kolodziejczyk. >>> >>> >>> ------------------------------------------------------------------------------ >>> Own the Future-Intel® Level Up Game Demo Contest 2013 >>> Rise to greatness in Intel's independent game demo contest. >>> Compete for recognition, cash, and the chance to get your game >>> on Steam. $5K grand prize plus 10 genre and skill prizes. >>> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d >>> _______________________________________________ >>> Gambas-devel mailing list >>> Gambas-devel at lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-devel >>> >>> > > > -- > Fabien Bodard > > > ------------------------------------------------------------------------------ > Own the Future-Intel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gambas at ...1... Thu Mar 28 03:41:36 2013 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Thu, 28 Mar 2013 03:41:36 +0100 Subject: [Gambas-devel] Interface of gb.opengl.sge Message-ID: <5153ADE0.7000804@...1...> Hi Tomek, I took a glance at your code, and I strongly suggest the following changes to the gb.opengl.gse interface before you go further. Why these changes? Mainly because I try to make Gambas components have the most similar interfaces as possible, so that the learning curve is lower. By the way, not that there is a design problem too : the MD2 model loading routine only works if the endianness of the CPU is the same as the endianness of the file. You should ensure that if the endianness is different, you swap the binary data accordingly. Now the old interface : GB_DESC Md2ModelDesc[] = { GB_DECLARE("Md2Model", sizeof(MD2MODEL)), GB_NOT_CREATABLE(), GB_STATIC_METHOD("Load", "Md2Model" , Md2Model_Load, "(Name)s"), GB_METHOD("SetPosition", NULL, Md2Model_SetPosition, "(X)f(Y)f(Z)f" ), GB_METHOD("DrawFrame", NULL, Md2Model_DrawFrame, "(Frame_No)i(Texture)i" ), GB_METHOD("DrawInterFrame", NULL, Md2Model_DrawInterFrame, "(Frame_No)i(InterFrame)f(Texture)i" ), GB_METHOD("GetFramesNo", "i", Md2Model_GetNoFrames, NULL ), GB_METHOD("GetFrameName", "s", Md2Model_GetFrameName, "(FrameNumber)i" ), GB_METHOD("Scale", NULL, Md2Model_Scale, "(Scale_x)f(Scale_y)f(Scale_z)f" ), GB_METHOD("_free", NULL, Md2Model_free, NULL ), GB_END_DECLARE }; The new one I suggest: GB_DESC Md2ModelDesc[] = { GB_DECLARE("Md2Model", sizeof(MD2MODEL)), GB_NOT_CREATABLE(), GB_STATIC_METHOD("Load", "Md2Model" , Md2Model_Load, "(Name)s"), // 'SetPosition' renamed to 'Move' GB_METHOD("Move", NULL, Md2Model_SetPosition, "(X)f(Y)f(Z)f" ), // Three properties to get/set the one coordinate GB_PROPERTY("X", "f", Md2Model_X), GB_PROPERTY("Y", "f", Md2Model_X), GB_PROPERTY("Z", "f", Md2Model_X), // A virtual object for accessing frame properties and count GB_PROPERTY_SELF("Frames", ".Md2Model.Frames"), GB_METHOD("Scale", NULL, Md2Model_Scale, "(ScaleX)f(ScaleY)f(ScaleZ)f" ), // Maybe you should add ScaleX, ScaleY and ScaleZ properties too. GB_METHOD("_free", NULL, Md2Model_free, NULL ), GB_END_DECLARE }; GB_DESC Md2ModelFramesDesc[] = { GB_DECLARE_VIRTUAL(".Md2Model.Frames"), // Was Md2Model_GetNoFrames GB_PROPERTY_READ("Count", "i", Md2Model_Frames_Count) GB_METHOD("_get", ".Md2Model.Frame", Md2Model_Frames_get, "(Frame)i"), GB_END_DECLARE } // The _get method of Md2Model_Frames is implemented that way: BEGIN_METHOD(Md2Model_Frames_get, GB_INTEGER frame) // Store the frame number into the object, it will be used immediately // by the method called on the virtual .Md2Model.Frame object. // Maybe check that the frame number is valid now. // And don't forget to add the 'frame' field into the object // structure. THIS->frame = VARG(frame); END_METHOD GB_DESC Md2ModelFrameDesc[] = { GB_DECLARE_VIRTUAL(".Md2Model.Frame"), // Was 'Md2Model.DrawFrame' GB_METHOD("Draw", NULL, Md2Model_Frame_Draw, "(Texture)i"), // Was 'Md2Model.DrawInterFrame' GB_METHOD("DrawInterFrame", NULL, Md2Model_Frame_DrawInterFrame, "(InterFrame)f(Texture)i"), GB_END_DECLARE } Tell me what you think about that and if you have questions! Regards, -- Beno?t Minisini From tommyline at ...674... Thu Mar 28 08:56:45 2013 From: tommyline at ...674... (Tomek) Date: Thu, 28 Mar 2013 07:56:45 +0000 Subject: [Gambas-devel] problems with new gb.sge (Simple Game Liobrary) component. In-Reply-To: References: <762980129.32509.1364302766387.JavaMail.root@...674...> <5152971E.6010207@...590...> <5152AC44.9040707@...674...> Message-ID: <5153F7BD.7050706@...674...> Hi Jussi, What GPU is on your card? Could you try to set screen.framerate in main sub to some lower number and see what happens? Tomek. On 28.03.2013 00:13, Jussi Lahtinen wrote: > Umm... 15757 frames in 5,0 seconds = 3151,400 FPS > And it made my computer to emit quiet high pitched noise, which I have > never heard before. > My video card is passively cooled, so it's not fan. > > Jussi > > > > > On Thu, Mar 28, 2013 at 12:09 AM, Fabien Bodard > wrote: > > I've try the example :-)... it work well ... 60 fps on my machine. > > I think you must to embed the init process in the screen class, to > simplify the user work. > > > ogre as new md2mesh > > ogre.loadtexture("path") > > ogre.addsequence("walk",0,100, 5000) (seqname, firstframe, > lastframe, duration of the sequence in ms) > > > public sub key_press > if key.code = key.up then > ogre.move(x,y,z) > ogre.sequence = ogre["walk"] > ogre.start > endif > > end > > > public sub screendraw > > ogre.draw > > endif > > > an internal timer increase the frame and the interpolation . > > but we can imagine also some way to force on a choosen sequence frame > > ogre.stop > ogre.frame=3 > > > well this is just some ideas to simplify the api but not the > better way lol it's just matter to think > > the opengl class must have to be used at less at possible :-). > Good work ! > > > > > 2013/3/27 Fabien Bodard > > > I didn't say you must use engine such as ogre an independent > one is better but long to do. > > Just keep in mind that the most of the game rendering and > scene calculating must be done by your class... in C or c++ > > Le 27 mars 2013 09:22, "Tomek" > a ?crit : > > On 27.03.2013 07 :37, Fabien Bodard > wrote: >> >> Yes thank you. We have some work done in the svn >> Gb.g3d... take a look in the exp branche. It is based on >> ogre. And have stuff done to load mesh in gambas archive. >> >> Take a look to blitzbasic and blitz3d for implementation >> ideas. But do not forget to stay in the object kiss >> Concept of gambas. We are here to remember you that. >> >> Le 27 mars 2013 07:52, "Kevin Fishburne" >> > > a ?crit : >> >> @Tomek Sorry to interject into the thread so rudely, >> but I'd like to say >> thanks for giving this some attention. With the >> coming of Valve's >> "Steambox" and the native Linux Steam client I think >> it's only a matter >> of time before GAMBAS proves itself a worthy language >> (with respect to >> compatible/available market share) for game >> development. Awesome effort >> and I'm proud of everyone here helping you jump the >> technical hurdles of >> implementing your component. >> >> -- >> Kevin Fishburne >> Eight Virtues >> www: http://sales.eightvirtues.com >> e-mail: sales at ...590... >> >> phone: (770) 853-6271 >> >> >> ------------------------------------------------------------------------------ >> Own the Future-Intel® Level Up Game Demo Contest 2013 >> Rise to greatness in Intel's independent game demo >> contest. >> Compete for recognition, cash, and the chance to get >> your game >> on Steam. $5K grand prize plus 10 genre and skill prizes. >> Submit your demo by 6/6/13. >> http://p.sf.net/sfu/intel_levelupd2d >> _______________________________________________ >> Gambas-devel mailing list >> Gambas-devel at lists.sourceforge.net >> >> https://lists.sourceforge.net/lists/listinfo/gambas-devel >> >> >> >> ------------------------------------------------------------------------------ >> Own the Future-Intel® Level Up Game Demo Contest 2013 >> Rise to greatness in Intel's independent game demo contest. >> Compete for recognition, cash, and the chance to get your game >> on Steam. $5K grand prize plus 10 genre and skill prizes. >> Submit your demo by 6/6/13.http://p.sf.net/sfu/intel_levelupd2d >> >> >> _______________________________________________ >> Gambas-devel mailing list >> Gambas-devel at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-devel > Hi Fabien, > What I had in mind when started writing this, was pure > simplicity, which means every class is independent of the > world and can be used on its own. I tried Ogre, Ode, > Irrlicht, and all of them seemed quite complicated to use. > And I didn't know about your effort just until some few > days ago. Is there any example of how to use gb.g3d engine? > I have particle system implemented too, I will commit it > as soon I'll update the names to match Benoit's syntax. > > Thank you > Tomek Kolodziejczyk. > > ------------------------------------------------------------------------------ > Own the Future-Intel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. > http://p.sf.net/sfu/intel_levelupd2d > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-devel > > > > > -- > Fabien Bodard > > ------------------------------------------------------------------------------ > Own the Future-Intel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-devel > > > > > ------------------------------------------------------------------------------ > Own the Future-Intel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d > > > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From tommyline at ...674... Thu Mar 28 09:24:02 2013 From: tommyline at ...674... (Tomek) Date: Thu, 28 Mar 2013 08:24:02 +0000 Subject: [Gambas-devel] Interface of gb.opengl.sge In-Reply-To: <5153ADE0.7000804@...1...> References: <5153ADE0.7000804@...1...> Message-ID: <5153FE22.6070600@...674...> On 28.03.2013 02:41, Beno?t Minisini wrote: > Hi Tomek, > > I took a glance at your code, and I strongly suggest the following > changes to the gb.opengl.gse interface before you go further. > > Why these changes? Mainly because I try to make Gambas components have > the most similar interfaces as possible, so that the learning curve is > lower. > > By the way, not that there is a design problem too : the MD2 model > loading routine only works if the endianness of the CPU is the same as > the endianness of the file. You should ensure that if the endianness is > different, you swap the binary data accordingly. > > Now the old interface : > > GB_DESC Md2ModelDesc[] = > { > GB_DECLARE("Md2Model", sizeof(MD2MODEL)), > GB_NOT_CREATABLE(), > GB_STATIC_METHOD("Load", "Md2Model" , Md2Model_Load, "(Name)s"), > GB_METHOD("SetPosition", NULL, Md2Model_SetPosition, "(X)f(Y)f(Z)f" ), > GB_METHOD("DrawFrame", NULL, Md2Model_DrawFrame, > "(Frame_No)i(Texture)i" ), > GB_METHOD("DrawInterFrame", NULL, Md2Model_DrawInterFrame, > "(Frame_No)i(InterFrame)f(Texture)i" ), > GB_METHOD("GetFramesNo", "i", Md2Model_GetNoFrames, NULL ), > GB_METHOD("GetFrameName", "s", Md2Model_GetFrameName, "(FrameNumber)i" ), > GB_METHOD("Scale", NULL, Md2Model_Scale, > "(Scale_x)f(Scale_y)f(Scale_z)f" ), > GB_METHOD("_free", NULL, Md2Model_free, NULL ), > GB_END_DECLARE > }; > > The new one I suggest: > > GB_DESC Md2ModelDesc[] = > { > GB_DECLARE("Md2Model", sizeof(MD2MODEL)), > GB_NOT_CREATABLE(), > GB_STATIC_METHOD("Load", "Md2Model" , Md2Model_Load, "(Name)s"), > // 'SetPosition' renamed to 'Move' > GB_METHOD("Move", NULL, Md2Model_SetPosition, "(X)f(Y)f(Z)f" ), > // Three properties to get/set the one coordinate > GB_PROPERTY("X", "f", Md2Model_X), > GB_PROPERTY("Y", "f", Md2Model_X), > GB_PROPERTY("Z", "f", Md2Model_X), > // A virtual object for accessing frame properties and count > GB_PROPERTY_SELF("Frames", ".Md2Model.Frames"), > GB_METHOD("Scale", NULL, Md2Model_Scale, "(ScaleX)f(ScaleY)f(ScaleZ)f" ), > // Maybe you should add ScaleX, ScaleY and ScaleZ properties too. > GB_METHOD("_free", NULL, Md2Model_free, NULL ), > GB_END_DECLARE > }; > > GB_DESC Md2ModelFramesDesc[] = > { > GB_DECLARE_VIRTUAL(".Md2Model.Frames"), > // Was Md2Model_GetNoFrames > GB_PROPERTY_READ("Count", "i", Md2Model_Frames_Count) > GB_METHOD("_get", ".Md2Model.Frame", Md2Model_Frames_get, "(Frame)i"), > GB_END_DECLARE > } > > // The _get method of Md2Model_Frames is implemented that way: > > BEGIN_METHOD(Md2Model_Frames_get, GB_INTEGER frame) > > // Store the frame number into the object, it will be used immediately > // by the method called on the virtual .Md2Model.Frame object. > // Maybe check that the frame number is valid now. > // And don't forget to add the 'frame' field into the object > // structure. > THIS->frame = VARG(frame); > > END_METHOD > > GB_DESC Md2ModelFrameDesc[] = > { > GB_DECLARE_VIRTUAL(".Md2Model.Frame"), > // Was 'Md2Model.DrawFrame' > GB_METHOD("Draw", NULL, Md2Model_Frame_Draw, "(Texture)i"), > // Was 'Md2Model.DrawInterFrame' > GB_METHOD("DrawInterFrame", NULL, Md2Model_Frame_DrawInterFrame, > "(InterFrame)f(Texture)i"), > GB_END_DECLARE > } > > Tell me what you think about that and if you have questions! > > Regards, > Hi Benoit, Thanks for your suggestions, I will try to do as much a I can using devel-api documentation page. It's the best way to learn I think. When I'm stuck, I'll ask for your help, ok? Question 1 - How do I check endianess of the CPU from component level? One more question - what would be the best way to make the class creatable - Md2Model_new I suppose, but what should be in that function? Can it be empty? Without creatable class I can't make an array of it. Thanks, Tomek From gambas at ...1... Thu Mar 28 10:53:56 2013 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Thu, 28 Mar 2013 10:53:56 +0100 Subject: [Gambas-devel] Interface of gb.opengl.sge In-Reply-To: <5153FE22.6070600@...674...> References: <5153ADE0.7000804@...1...> <5153FE22.6070600@...674...> Message-ID: <51541334.2010204@...1...> Le 28/03/2013 09:24, Tomek a ?crit : > On 28.03.2013 02:41, Beno?t Minisini wrote: >> Hi Tomek, >> >> I took a glance at your code, and I strongly suggest the following >> changes to the gb.opengl.gse interface before you go further. >> >> Why these changes? Mainly because I try to make Gambas components have >> the most similar interfaces as possible, so that the learning curve is >> lower. >> >> By the way, not that there is a design problem too : the MD2 model >> loading routine only works if the endianness of the CPU is the same as >> the endianness of the file. You should ensure that if the endianness is >> different, you swap the binary data accordingly. >> >> Now the old interface : >> >> GB_DESC Md2ModelDesc[] = >> { >> GB_DECLARE("Md2Model", sizeof(MD2MODEL)), >> GB_NOT_CREATABLE(), >> GB_STATIC_METHOD("Load", "Md2Model" , Md2Model_Load, "(Name)s"), >> GB_METHOD("SetPosition", NULL, Md2Model_SetPosition, "(X)f(Y)f(Z)f" ), >> GB_METHOD("DrawFrame", NULL, Md2Model_DrawFrame, >> "(Frame_No)i(Texture)i" ), >> GB_METHOD("DrawInterFrame", NULL, Md2Model_DrawInterFrame, >> "(Frame_No)i(InterFrame)f(Texture)i" ), >> GB_METHOD("GetFramesNo", "i", Md2Model_GetNoFrames, NULL ), >> GB_METHOD("GetFrameName", "s", Md2Model_GetFrameName, "(FrameNumber)i" ), >> GB_METHOD("Scale", NULL, Md2Model_Scale, >> "(Scale_x)f(Scale_y)f(Scale_z)f" ), >> GB_METHOD("_free", NULL, Md2Model_free, NULL ), >> GB_END_DECLARE >> }; >> >> The new one I suggest: >> >> GB_DESC Md2ModelDesc[] = >> { >> GB_DECLARE("Md2Model", sizeof(MD2MODEL)), >> GB_NOT_CREATABLE(), >> GB_STATIC_METHOD("Load", "Md2Model" , Md2Model_Load, "(Name)s"), >> // 'SetPosition' renamed to 'Move' >> GB_METHOD("Move", NULL, Md2Model_SetPosition, "(X)f(Y)f(Z)f" ), >> // Three properties to get/set the one coordinate >> GB_PROPERTY("X", "f", Md2Model_X), >> GB_PROPERTY("Y", "f", Md2Model_X), >> GB_PROPERTY("Z", "f", Md2Model_X), >> // A virtual object for accessing frame properties and count >> GB_PROPERTY_SELF("Frames", ".Md2Model.Frames"), >> GB_METHOD("Scale", NULL, Md2Model_Scale, "(ScaleX)f(ScaleY)f(ScaleZ)f" ), >> // Maybe you should add ScaleX, ScaleY and ScaleZ properties too. >> GB_METHOD("_free", NULL, Md2Model_free, NULL ), >> GB_END_DECLARE >> }; >> >> GB_DESC Md2ModelFramesDesc[] = >> { >> GB_DECLARE_VIRTUAL(".Md2Model.Frames"), >> // Was Md2Model_GetNoFrames >> GB_PROPERTY_READ("Count", "i", Md2Model_Frames_Count) >> GB_METHOD("_get", ".Md2Model.Frame", Md2Model_Frames_get, "(Frame)i"), >> GB_END_DECLARE >> } >> >> // The _get method of Md2Model_Frames is implemented that way: >> >> BEGIN_METHOD(Md2Model_Frames_get, GB_INTEGER frame) >> >> // Store the frame number into the object, it will be used immediately >> // by the method called on the virtual .Md2Model.Frame object. >> // Maybe check that the frame number is valid now. >> // And don't forget to add the 'frame' field into the object >> // structure. >> THIS->frame = VARG(frame); >> >> END_METHOD >> >> GB_DESC Md2ModelFrameDesc[] = >> { >> GB_DECLARE_VIRTUAL(".Md2Model.Frame"), >> // Was 'Md2Model.DrawFrame' >> GB_METHOD("Draw", NULL, Md2Model_Frame_Draw, "(Texture)i"), >> // Was 'Md2Model.DrawInterFrame' >> GB_METHOD("DrawInterFrame", NULL, Md2Model_Frame_DrawInterFrame, >> "(InterFrame)f(Texture)i"), >> GB_END_DECLARE >> } >> >> Tell me what you think about that and if you have questions! >> >> Regards, >> > Hi Benoit, > > Thanks for your suggestions, I will try to do as much a I can using > devel-api documentation page. It's the best way to learn I think. When > I'm stuck, I'll ask for your help, ok? > Question 1 - How do I check endianess of the CPU from component level? You must read a well known two or four bytes integer value from the file with fread, and see if you get it swapped or not. If you get it swapped, then you know that all binary values must be swapped. You can use the magic identifier at the beginning of the file, but beware that you must check it byte by byte before reading it as a binary data. Otherwise you may take some files starting with the magic number inverted as MD2 model files! > One more question - what would be the best way to make the class > creatable - Md2Model_new I suppose, but what should be in that function? > Can it be empty? Without creatable class I can't make an array of it. Yes, you must be able to create void models, and manage them in all functions. If a void model must not be used anywhere, you can use the "check hook". You declare the check hook in the class description structure with: GB_HOOK_CHECK(my_check_function), Then 'my_check_function' must be a function taking a pointer to a Md2Model object and returning an integer different from zero if that object is invalid. (The interpreter will raise the 'Invalid object' error). Moreover, you must think about implementing boolean operators between models if it has some sense (merging two models for example). I have no idea, not being an OpenGL expert, but if you want to implement such a thing, then a void model must be perfectly valid then. Regards, -- Beno?t Minisini From jussi.lahtinen at ...176... Thu Mar 28 14:28:03 2013 From: jussi.lahtinen at ...176... (Jussi Lahtinen) Date: Thu, 28 Mar 2013 15:28:03 +0200 Subject: [Gambas-devel] problems with new gb.sge (Simple Game Liobrary) component. In-Reply-To: <5153F7BD.7050706@...674...> References: <762980129.32509.1364302766387.JavaMail.root@...674...> <5152971E.6010207@...590...> <5152AC44.9040707@...674...> <5153F7BD.7050706@...674...> Message-ID: GeForce 8600 GT I found out that the noise is just coil whine. It seems to be just coincidence that this example hit the resonance frequency. Jussi On Thu, Mar 28, 2013 at 9:56 AM, Tomek wrote: > Hi Jussi, > What GPU is on your card? > Could you try to set screen.framerate in main sub to some lower number and > see what happens? > > Tomek. > > > On 28.03.2013 00:13, Jussi Lahtinen wrote: > > Umm... 15757 frames in 5,0 seconds = 3151,400 FPS > And it made my computer to emit quiet high pitched noise, which I have > never heard before. > My video card is passively cooled, so it's not fan. > > Jussi > > > > > On Thu, Mar 28, 2013 at 12:09 AM, Fabien Bodard wrote: > >> I've try the example :-)... it work well ... 60 fps on my machine. >> >> I think you must to embed the init process in the screen class, to >> simplify the user work. >> >> >> ogre as new md2mesh >> >> ogre.loadtexture("path") >> >> ogre.addsequence("walk",0,100, 5000) (seqname, firstframe, lastframe, >> duration of the sequence in ms) >> >> >> public sub key_press >> if key.code = key.up then >> ogre.move(x,y,z) >> ogre.sequence = ogre["walk"] >> ogre.start >> endif >> >> end >> >> >> public sub screendraw >> >> ogre.draw >> >> endif >> >> >> an internal timer increase the frame and the interpolation . >> >> but we can imagine also some way to force on a choosen sequence frame >> >> ogre.stop >> ogre.frame=3 >> >> >> well this is just some ideas to simplify the api but not the better way >> lol it's just matter to think >> >> the opengl class must have to be used at less at possible :-). >> Good work ! >> >> >> >> >> 2013/3/27 Fabien Bodard >> >>> I didn't say you must use engine such as ogre an independent one is >>> better but long to do. >>> >>> Just keep in mind that the most of the game rendering and scene >>> calculating must be done by your class... in C or c++ >>> Le 27 mars 2013 09:22, "Tomek" a ?crit : >>> >>> On 27.03.2013 07 <27.03.2013%2007>:37, Fabien Bodard wrote: >>>> >>>> Yes thank you. We have some work done in the svn >>>> Gb.g3d... take a look in the exp branche. It is based on ogre. And have >>>> stuff done to load mesh in gambas archive. >>>> >>>> Take a look to blitzbasic and blitz3d for implementation ideas. But do >>>> not forget to stay in the object kiss Concept of gambas. We are here to >>>> remember you that. >>>> Le 27 mars 2013 07:52, "Kevin Fishburne" < >>>> kevinfishburne at ...590...> a ?crit : >>>> >>>>> @Tomek Sorry to interject into the thread so rudely, but I'd like to >>>>> say >>>>> thanks for giving this some attention. With the coming of Valve's >>>>> "Steambox" and the native Linux Steam client I think it's only a matter >>>>> of time before GAMBAS proves itself a worthy language (with respect to >>>>> compatible/available market share) for game development. Awesome effort >>>>> and I'm proud of everyone here helping you jump the technical hurdles >>>>> of >>>>> implementing your component. >>>>> >>>>> -- >>>>> Kevin Fishburne >>>>> Eight Virtues >>>>> www: http://sales.eightvirtues.com >>>>> e-mail: sales at ...590... >>>>> phone: (770) 853-6271 >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Own the Future-Intel® Level Up Game Demo Contest 2013 >>>>> Rise to greatness in Intel's independent game demo contest. >>>>> Compete for recognition, cash, and the chance to get your game >>>>> on Steam. $5K grand prize plus 10 genre and skill prizes. >>>>> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d >>>>> _______________________________________________ >>>>> Gambas-devel mailing list >>>>> Gambas-devel at lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/gambas-devel >>>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Own the Future-Intel® Level Up Game Demo Contest 2013 >>>> Rise to greatness in Intel's independent game demo contest. >>>> Compete for recognition, cash, and the chance to get your game >>>> on Steam. $5K grand prize plus 10 genre and skill prizes. >>>> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d >>>> >>>> >>>> >>>> _______________________________________________ >>>> Gambas-devel mailing listGambas-devel at ...720...://lists.sourceforge.net/lists/listinfo/gambas-devel >>>> >>>> Hi Fabien, >>>> What I had in mind when started writing this, was pure simplicity, >>>> which means every class is independent of the world and can be used on its >>>> own. I tried Ogre, Ode, Irrlicht, and all of them seemed quite complicated >>>> to use. And I didn't know about your effort just until some few days ago. >>>> Is there any example of how to use gb.g3d engine? >>>> I have particle system implemented too, I will commit it as soon I'll >>>> update the names to match Benoit's syntax. >>>> >>>> Thank you >>>> Tomek Kolodziejczyk. >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Own the Future-Intel® Level Up Game Demo Contest 2013 >>>> Rise to greatness in Intel's independent game demo contest. >>>> Compete for recognition, cash, and the chance to get your game >>>> on Steam. $5K grand prize plus 10 genre and skill prizes. >>>> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d >>>> _______________________________________________ >>>> Gambas-devel mailing list >>>> Gambas-devel at lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-devel >>>> >>>> >> >> >> -- >> Fabien Bodard >> >> >> ------------------------------------------------------------------------------ >> Own the Future-Intel® Level Up Game Demo Contest 2013 >> Rise to greatness in Intel's independent game demo contest. >> Compete for recognition, cash, and the chance to get your game >> on Steam. $5K grand prize plus 10 genre and skill prizes. >> Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d >> _______________________________________________ >> Gambas-devel mailing list >> Gambas-devel at lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gambas-devel >> >> > > > ------------------------------------------------------------------------------ > Own the Future-Intel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d > > > > _______________________________________________ > Gambas-devel mailing listGambas-devel at ...720...://lists.sourceforge.net/lists/listinfo/gambas-devel > > > > > ------------------------------------------------------------------------------ > Own the Future-Intel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d > _______________________________________________ > Gambas-devel mailing list > Gambas-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-devel > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tommyline at ...674... Thu Mar 28 16:08:50 2013 From: tommyline at ...674... (Tomek) Date: Thu, 28 Mar 2013 15:08:50 +0000 Subject: [Gambas-devel] Interface of gb.opengl.sge In-Reply-To: <51541334.2010204@...1...> References: <5153ADE0.7000804@...1...> <5153FE22.6070600@...674...> <51541334.2010204@...1...> Message-ID: <51545D02.8080605@...674...> On 28.03.2013 09:53, Beno?t Minisini wrote: > Le 28/03/2013 09:24, Tomek a ?crit : >> On 28.03.2013 02:41, Beno?t Minisini wrote: >>> Hi Tomek, >>> >>> I took a glance at your code, and I strongly suggest the following >>> changes to the gb.opengl.gse interface before you go further. >>> >>> Why these changes? Mainly because I try to make Gambas components have >>> the most similar interfaces as possible, so that the learning curve is >>> lower. >>> >>> By the way, not that there is a design problem too : the MD2 model >>> loading routine only works if the endianness of the CPU is the same as >>> the endianness of the file. You should ensure that if the endianness is >>> different, you swap the binary data accordingly. >>> >>> Now the old interface : >>> >>> GB_DESC Md2ModelDesc[] = >>> { >>> GB_DECLARE("Md2Model", sizeof(MD2MODEL)), >>> GB_NOT_CREATABLE(), >>> GB_STATIC_METHOD("Load", "Md2Model" , Md2Model_Load, "(Name)s"), >>> GB_METHOD("SetPosition", NULL, Md2Model_SetPosition, "(X)f(Y)f(Z)f" ), >>> GB_METHOD("DrawFrame", NULL, Md2Model_DrawFrame, >>> "(Frame_No)i(Texture)i" ), >>> GB_METHOD("DrawInterFrame", NULL, Md2Model_DrawInterFrame, >>> "(Frame_No)i(InterFrame)f(Texture)i" ), >>> GB_METHOD("GetFramesNo", "i", Md2Model_GetNoFrames, NULL ), >>> GB_METHOD("GetFrameName", "s", Md2Model_GetFrameName, "(FrameNumber)i" ), >>> GB_METHOD("Scale", NULL, Md2Model_Scale, >>> "(Scale_x)f(Scale_y)f(Scale_z)f" ), >>> GB_METHOD("_free", NULL, Md2Model_free, NULL ), >>> GB_END_DECLARE >>> }; >>> >>> The new one I suggest: >>> >>> GB_DESC Md2ModelDesc[] = >>> { >>> GB_DECLARE("Md2Model", sizeof(MD2MODEL)), >>> GB_NOT_CREATABLE(), >>> GB_STATIC_METHOD("Load", "Md2Model" , Md2Model_Load, "(Name)s"), >>> // 'SetPosition' renamed to 'Move' >>> GB_METHOD("Move", NULL, Md2Model_SetPosition, "(X)f(Y)f(Z)f" ), >>> // Three properties to get/set the one coordinate >>> GB_PROPERTY("X", "f", Md2Model_X), >>> GB_PROPERTY("Y", "f", Md2Model_X), >>> GB_PROPERTY("Z", "f", Md2Model_X), >>> // A virtual object for accessing frame properties and count >>> GB_PROPERTY_SELF("Frames", ".Md2Model.Frames"), >>> GB_METHOD("Scale", NULL, Md2Model_Scale, "(ScaleX)f(ScaleY)f(ScaleZ)f" ), >>> // Maybe you should add ScaleX, ScaleY and ScaleZ properties too. >>> GB_METHOD("_free", NULL, Md2Model_free, NULL ), >>> GB_END_DECLARE >>> }; >>> >>> GB_DESC Md2ModelFramesDesc[] = >>> { >>> GB_DECLARE_VIRTUAL(".Md2Model.Frames"), >>> // Was Md2Model_GetNoFrames >>> GB_PROPERTY_READ("Count", "i", Md2Model_Frames_Count) >>> GB_METHOD("_get", ".Md2Model.Frame", Md2Model_Frames_get, "(Frame)i"), >>> GB_END_DECLARE >>> } >>> >>> // The _get method of Md2Model_Frames is implemented that way: >>> >>> BEGIN_METHOD(Md2Model_Frames_get, GB_INTEGER frame) >>> >>> // Store the frame number into the object, it will be used immediately >>> // by the method called on the virtual .Md2Model.Frame object. >>> // Maybe check that the frame number is valid now. >>> // And don't forget to add the 'frame' field into the object >>> // structure. >>> THIS->frame = VARG(frame); >>> >>> END_METHOD >>> >>> GB_DESC Md2ModelFrameDesc[] = >>> { >>> GB_DECLARE_VIRTUAL(".Md2Model.Frame"), >>> // Was 'Md2Model.DrawFrame' >>> GB_METHOD("Draw", NULL, Md2Model_Frame_Draw, "(Texture)i"), >>> // Was 'Md2Model.DrawInterFrame' >>> GB_METHOD("DrawInterFrame", NULL, Md2Model_Frame_DrawInterFrame, >>> "(InterFrame)f(Texture)i"), >>> GB_END_DECLARE >>> } >>> >>> Tell me what you think about that and if you have questions! >>> >>> Regards, >>> >> Hi Benoit, >> >> Thanks for your suggestions, I will try to do as much a I can using >> devel-api documentation page. It's the best way to learn I think. When >> I'm stuck, I'll ask for your help, ok? >> Question 1 - How do I check endianess of the CPU from component level? > You must read a well known two or four bytes integer value from the file > with fread, and see if you get it swapped or not. > > If you get it swapped, then you know that all binary values must be swapped. > > You can use the magic identifier at the beginning of the file, but > beware that you must check it byte by byte before reading it as a binary > data. > > Otherwise you may take some files starting with the magic number > inverted as MD2 model files! As I absolutely have no means to test Big-Endianness, I think I'll just put GB.Error("Big Endian not supported yet."), if reading header gives reversed value. >> One more question - what would be the best way to make the class >> creatable - Md2Model_new I suppose, but what should be in that function? >> Can it be empty? Without creatable class I can't make an array of it. > Yes, you must be able to create void models, and manage them in all > functions. > > If a void model must not be used anywhere, you can use the "check hook". > > You declare the check hook in the class description structure with: > > GB_HOOK_CHECK(my_check_function), > > Then 'my_check_function' must be a function taking a pointer to a > Md2Model object and returning an integer different from zero if that > object is invalid. (The interpreter will raise the 'Invalid object' error). > > Moreover, you must think about implementing boolean operators between > models if it has some sense (merging two models for example). I have no > idea, not being an OpenGL expert, but if you want to implement such a > thing, then a void model must be perfectly valid then. > > Regards, > Is it similar to cquad class in GLU? But Md2Model has no external initiator as quadric do. I made some changes if file, but cant figure out how to return frame object. File Md2Model.c attached. Tomek. -------------- next part -------------- A non-text attachment was scrubbed... Name: cmd2model.c Type: text/x-csrc Size: 17256 bytes Desc: not available URL: From tobias at ...692... Thu Mar 28 16:30:12 2013 From: tobias at ...692... (Tobias Boege) Date: Thu, 28 Mar 2013 16:30:12 +0100 Subject: [Gambas-devel] Interface of gb.opengl.sge In-Reply-To: <51545D02.8080605@...674...> References: <5153ADE0.7000804@...1...> <5153FE22.6070600@...674...> <51541334.2010204@...1...> <51545D02.8080605@...674...> Message-ID: <20130328153012.GA495@...693...> On Thu, 28 Mar 2013, Tomek wrote: > >>Question 1 - How do I check endianess of the CPU from component level? > >You must read a well known two or four bytes integer value from the file > >with fread, and see if you get it swapped or not. > > > >If you get it swapped, then you know that all binary values must be swapped. > > > >You can use the magic identifier at the beginning of the file, but > >beware that you must check it byte by byte before reading it as a binary > >data. > > > >Otherwise you may take some files starting with the magic number > >inverted as MD2 model files! > As I absolutely have no means to test Big-Endianness, I think I'll > just put GB.Error("Big Endian not supported yet."), if reading > header gives reversed value. I think the better strategy would be to *try* to implement endianess-neutral code and let big endian users complain if it doesn't work correctly. The obvious rationale is that you make progress with this method. I don't know anything about the files you're opening but endian problems can easily be solved by means of . Is there any reason not to use it? Regards, Tobi From gambas at ...1... Thu Mar 28 16:39:33 2013 From: gambas at ...1... (=?ISO-8859-1?Q?Beno=EEt_Minisini?=) Date: Thu, 28 Mar 2013 16:39:33 +0100 Subject: [Gambas-devel] Interface of gb.opengl.sge In-Reply-To: <51545D02.8080605@...674...> References: <5153ADE0.7000804@...1...> <5153FE22.6070600@...674...> <51541334.2010204@...1...> <51545D02.8080605@...674...> Message-ID: <51546435.6060005@...1...> Le 28/03/2013 16:08, Tomek a ?crit : > On 28.03.2013 09:53, Beno?t Minisini wrote: >> Le 28/03/2013 09:24, Tomek a ?crit : >>> On 28.03.2013 02:41, Beno?t Minisini wrote: >>>> Hi Tomek, >>>> >>>> I took a glance at your code, and I strongly suggest the following >>>> changes to the gb.opengl.gse interface before you go further. >>>> >>>> Why these changes? Mainly because I try to make Gambas components have >>>> the most similar interfaces as possible, so that the learning curve is >>>> lower. >>>> >>>> By the way, not that there is a design problem too : the MD2 model >>>> loading routine only works if the endianness of the CPU is the same as >>>> the endianness of the file. You should ensure that if the endianness is >>>> different, you swap the binary data accordingly. >>>> >>>> Now the old interface : >>>> >>>> GB_DESC Md2ModelDesc[] = >>>> { >>>> GB_DECLARE("Md2Model", sizeof(MD2MODEL)), >>>> GB_NOT_CREATABLE(), >>>> GB_STATIC_METHOD("Load", "Md2Model" , Md2Model_Load, "(Name)s"), >>>> GB_METHOD("SetPosition", NULL, Md2Model_SetPosition, >>>> "(X)f(Y)f(Z)f" ), >>>> GB_METHOD("DrawFrame", NULL, Md2Model_DrawFrame, >>>> "(Frame_No)i(Texture)i" ), >>>> GB_METHOD("DrawInterFrame", NULL, Md2Model_DrawInterFrame, >>>> "(Frame_No)i(InterFrame)f(Texture)i" ), >>>> GB_METHOD("GetFramesNo", "i", Md2Model_GetNoFrames, NULL ), >>>> GB_METHOD("GetFrameName", "s", Md2Model_GetFrameName, >>>> "(FrameNumber)i" ), >>>> GB_METHOD("Scale", NULL, Md2Model_Scale, >>>> "(Scale_x)f(Scale_y)f(Scale_z)f" ), >>>> GB_METHOD("_free", NULL, Md2Model_free, NULL ), >>>> GB_END_DECLARE >>>> }; >>>> >>>> The new one I suggest: >>>> >>>> GB_DESC Md2ModelDesc[] = >>>> { >>>> GB_DECLARE("Md2Model", sizeof(MD2MODEL)), >>>> GB_NOT_CREATABLE(), >>>> GB_STATIC_METHOD("Load", "Md2Model" , Md2Model_Load, "(Name)s"), >>>> // 'SetPosition' renamed to 'Move' >>>> GB_METHOD("Move", NULL, Md2Model_SetPosition, "(X)f(Y)f(Z)f" ), >>>> // Three properties to get/set the one coordinate >>>> GB_PROPERTY("X", "f", Md2Model_X), >>>> GB_PROPERTY("Y", "f", Md2Model_X), >>>> GB_PROPERTY("Z", "f", Md2Model_X), >>>> // A virtual object for accessing frame properties and count >>>> GB_PROPERTY_SELF("Frames", ".Md2Model.Frames"), >>>> GB_METHOD("Scale", NULL, Md2Model_Scale, >>>> "(ScaleX)f(ScaleY)f(ScaleZ)f" ), >>>> // Maybe you should add ScaleX, ScaleY and ScaleZ properties too. >>>> GB_METHOD("_free", NULL, Md2Model_free, NULL ), >>>> GB_END_DECLARE >>>> }; >>>> >>>> GB_DESC Md2ModelFramesDesc[] = >>>> { >>>> GB_DECLARE_VIRTUAL(".Md2Model.Frames"), >>>> // Was Md2Model_GetNoFrames >>>> GB_PROPERTY_READ("Count", "i", Md2Model_Frames_Count) >>>> GB_METHOD("_get", ".Md2Model.Frame", Md2Model_Frames_get, >>>> "(Frame)i"), >>>> GB_END_DECLARE >>>> } >>>> >>>> // The _get method of Md2Model_Frames is implemented that way: >>>> >>>> BEGIN_METHOD(Md2Model_Frames_get, GB_INTEGER frame) >>>> >>>> // Store the frame number into the object, it will be used >>>> immediately >>>> // by the method called on the virtual .Md2Model.Frame object. >>>> // Maybe check that the frame number is valid now. >>>> // And don't forget to add the 'frame' field into the object >>>> // structure. >>>> THIS->frame = VARG(frame); >>>> >>>> END_METHOD >>>> >>>> GB_DESC Md2ModelFrameDesc[] = >>>> { >>>> GB_DECLARE_VIRTUAL(".Md2Model.Frame"), >>>> // Was 'Md2Model.DrawFrame' >>>> GB_METHOD("Draw", NULL, Md2Model_Frame_Draw, "(Texture)i"), >>>> // Was 'Md2Model.DrawInterFrame' >>>> GB_METHOD("DrawInterFrame", NULL, Md2Model_Frame_DrawInterFrame, >>>> "(InterFrame)f(Texture)i"), >>>> GB_END_DECLARE >>>> } >>>> >>>> Tell me what you think about that and if you have questions! >>>> >>>> Regards, >>>> >>> Hi Benoit, >>> >>> Thanks for your suggestions, I will try to do as much a I can using >>> devel-api documentation page. It's the best way to learn I think. When >>> I'm stuck, I'll ask for your help, ok? >>> Question 1 - How do I check endianess of the CPU from component level? >> You must read a well known two or four bytes integer value from the file >> with fread, and see if you get it swapped or not. >> >> If you get it swapped, then you know that all binary values must be >> swapped. >> >> You can use the magic identifier at the beginning of the file, but >> beware that you must check it byte by byte before reading it as a binary >> data. >> >> Otherwise you may take some files starting with the magic number >> inverted as MD2 model files! > As I absolutely have no means to test Big-Endianness, I think I'll just > put GB.Error("Big Endian not supported yet."), if reading header gives > reversed value. > > >>> One more question - what would be the best way to make the class >>> creatable - Md2Model_new I suppose, but what should be in that function? >>> Can it be empty? Without creatable class I can't make an array of it. >> Yes, you must be able to create void models, and manage them in all >> functions. >> >> If a void model must not be used anywhere, you can use the "check hook". >> >> You declare the check hook in the class description structure with: >> >> GB_HOOK_CHECK(my_check_function), >> >> Then 'my_check_function' must be a function taking a pointer to a >> Md2Model object and returning an integer different from zero if that >> object is invalid. (The interpreter will raise the 'Invalid object' >> error). >> >> Moreover, you must think about implementing boolean operators between >> models if it has some sense (merging two models for example). I have no >> idea, not being an OpenGL expert, but if you want to implement such a >> thing, then a void model must be perfectly valid then. >> >> Regards, >> > Is it similar to cquad class in GLU? But Md2Model has no external > initiator as quadric do. No idea. :-) But if you have two models, maybe it is possible to create one model that is the union of both. But I have no idea if it is possible or useful. I just told you so in case. > > I made some changes if file, but cant figure out how to return frame > object. File Md2Model.c attached. Sorry, I forgot a line: BEGIN_METHOD(Md2Model_Frames_get, GB_INTEGER frame) // Store the frame number into the object, it will be used immediately // by the method called on the virtual .Md2Model.Frame object. // Maybe check that the frame number is valid now. // And don't forget to add the 'frame' field into the object // structure. THIS->frame = VARG(frame); GB_RETURN_SELF(); END_METHOD Then the Md2Model_Frame_Draw method does not take the frame number as argument anymore. It will use 'THIS->frame' internally instead. Regards, -- Beno?t Minisini From tommyline at ...674... Sat Mar 30 11:16:57 2013 From: tommyline at ...674... (Tomek) Date: Sat, 30 Mar 2013 10:16:57 +0000 Subject: [Gambas-devel] Interface of gb.opengl.sge In-Reply-To: <51546435.6060005@...1...> References: <5153ADE0.7000804@...1...> <5153FE22.6070600@...674...> <51541334.2010204@...1...> <51545D02.8080605@...674...> <51546435.6060005@...1...> Message-ID: <5156BB99.9040703@...674...> On 28.03.2013 15:39, Beno?t Minisini wrote: > Le 28/03/2013 16:08, Tomek a ?crit : >> On 28.03.2013 09:53, Beno?t Minisini wrote: >>> Le 28/03/2013 09:24, Tomek a ?crit : >>>> On 28.03.2013 02:41, Beno?t Minisini wrote: >>>>> Hi Tomek, >>>>> >>>>> I took a glance at your code, and I strongly suggest the following >>>>> changes to the gb.opengl.gse interface before you go further. >>>>> >>>>> Why these changes? Mainly because I try to make Gambas components have >>>>> the most similar interfaces as possible, so that the learning curve is >>>>> lower. >>>>> >>>>> By the way, not that there is a design problem too : the MD2 model >>>>> loading routine only works if the endianness of the CPU is the same as >>>>> the endianness of the file. You should ensure that if the endianness is >>>>> different, you swap the binary data accordingly. >>>>> >>>>> Now the old interface : >>>>> >>>>> GB_DESC Md2ModelDesc[] = >>>>> { >>>>> GB_DECLARE("Md2Model", sizeof(MD2MODEL)), >>>>> GB_NOT_CREATABLE(), >>>>> GB_STATIC_METHOD("Load", "Md2Model" , Md2Model_Load, "(Name)s"), >>>>> GB_METHOD("SetPosition", NULL, Md2Model_SetPosition, >>>>> "(X)f(Y)f(Z)f" ), >>>>> GB_METHOD("DrawFrame", NULL, Md2Model_DrawFrame, >>>>> "(Frame_No)i(Texture)i" ), >>>>> GB_METHOD("DrawInterFrame", NULL, Md2Model_DrawInterFrame, >>>>> "(Frame_No)i(InterFrame)f(Texture)i" ), >>>>> GB_METHOD("GetFramesNo", "i", Md2Model_GetNoFrames, NULL ), >>>>> GB_METHOD("GetFrameName", "s", Md2Model_GetFrameName, >>>>> "(FrameNumber)i" ), >>>>> GB_METHOD("Scale", NULL, Md2Model_Scale, >>>>> "(Scale_x)f(Scale_y)f(Scale_z)f" ), >>>>> GB_METHOD("_free", NULL, Md2Model_free, NULL ), >>>>> GB_END_DECLARE >>>>> }; >>>>> >>>>> The new one I suggest: >>>>> >>>>> GB_DESC Md2ModelDesc[] = >>>>> { >>>>> GB_DECLARE("Md2Model", sizeof(MD2MODEL)), >>>>> GB_NOT_CREATABLE(), >>>>> GB_STATIC_METHOD("Load", "Md2Model" , Md2Model_Load, "(Name)s"), >>>>> // 'SetPosition' renamed to 'Move' >>>>> GB_METHOD("Move", NULL, Md2Model_SetPosition, "(X)f(Y)f(Z)f" ), >>>>> // Three properties to get/set the one coordinate >>>>> GB_PROPERTY("X", "f", Md2Model_X), >>>>> GB_PROPERTY("Y", "f", Md2Model_X), >>>>> GB_PROPERTY("Z", "f", Md2Model_X), >>>>> // A virtual object for accessing frame properties and count >>>>> GB_PROPERTY_SELF("Frames", ".Md2Model.Frames"), >>>>> GB_METHOD("Scale", NULL, Md2Model_Scale, >>>>> "(ScaleX)f(ScaleY)f(ScaleZ)f" ), >>>>> // Maybe you should add ScaleX, ScaleY and ScaleZ properties too. >>>>> GB_METHOD("_free", NULL, Md2Model_free, NULL ), >>>>> GB_END_DECLARE >>>>> }; >>>>> >>>>> GB_DESC Md2ModelFramesDesc[] = >>>>> { >>>>> GB_DECLARE_VIRTUAL(".Md2Model.Frames"), >>>>> // Was Md2Model_GetNoFrames >>>>> GB_PROPERTY_READ("Count", "i", Md2Model_Frames_Count) >>>>> GB_METHOD("_get", ".Md2Model.Frame", Md2Model_Frames_get, >>>>> "(Frame)i"), >>>>> GB_END_DECLARE >>>>> } >>>>> >>>>> // The _get method of Md2Model_Frames is implemented that way: >>>>> >>>>> BEGIN_METHOD(Md2Model_Frames_get, GB_INTEGER frame) >>>>> >>>>> // Store the frame number into the object, it will be used >>>>> immediately >>>>> // by the method called on the virtual .Md2Model.Frame object. >>>>> // Maybe check that the frame number is valid now. >>>>> // And don't forget to add the 'frame' field into the object >>>>> // structure. >>>>> THIS->frame = VARG(frame); >>>>> >>>>> END_METHOD >>>>> >>>>> GB_DESC Md2ModelFrameDesc[] = >>>>> { >>>>> GB_DECLARE_VIRTUAL(".Md2Model.Frame"), >>>>> // Was 'Md2Model.DrawFrame' >>>>> GB_METHOD("Draw", NULL, Md2Model_Frame_Draw, "(Texture)i"), >>>>> // Was 'Md2Model.DrawInterFrame' >>>>> GB_METHOD("DrawInterFrame", NULL, Md2Model_Frame_DrawInterFrame, >>>>> "(InterFrame)f(Texture)i"), >>>>> GB_END_DECLARE >>>>> } >>>>> >>>>> Tell me what you think about that and if you have questions! >>>>> >>>>> Regards, >>>>> >>>> Hi Benoit, >>>> >>>> Thanks for your suggestions, I will try to do as much a I can using >>>> devel-api documentation page. It's the best way to learn I think. When >>>> I'm stuck, I'll ask for your help, ok? >>>> Question 1 - How do I check endianess of the CPU from component level? >>> You must read a well known two or four bytes integer value from the file >>> with fread, and see if you get it swapped or not. >>> >>> If you get it swapped, then you know that all binary values must be >>> swapped. >>> >>> You can use the magic identifier at the beginning of the file, but >>> beware that you must check it byte by byte before reading it as a binary >>> data. >>> >>> Otherwise you may take some files starting with the magic number >>> inverted as MD2 model files! >> As I absolutely have no means to test Big-Endianness, I think I'll just >> put GB.Error("Big Endian not supported yet."), if reading header gives >> reversed value. >> >> >>>> One more question - what would be the best way to make the class >>>> creatable - Md2Model_new I suppose, but what should be in that function? >>>> Can it be empty? Without creatable class I can't make an array of it. >>> Yes, you must be able to create void models, and manage them in all >>> functions. >>> >>> If a void model must not be used anywhere, you can use the "check hook". >>> >>> You declare the check hook in the class description structure with: >>> >>> GB_HOOK_CHECK(my_check_function), >>> >>> Then 'my_check_function' must be a function taking a pointer to a >>> Md2Model object and returning an integer different from zero if that >>> object is invalid. (The interpreter will raise the 'Invalid object' >>> error). >>> >>> Moreover, you must think about implementing boolean operators between >>> models if it has some sense (merging two models for example). I have no >>> idea, not being an OpenGL expert, but if you want to implement such a >>> thing, then a void model must be perfectly valid then. >>> >>> Regards, >>> >> Is it similar to cquad class in GLU? But Md2Model has no external >> initiator as quadric do. > No idea. :-) > > But if you have two models, maybe it is possible to create one model > that is the union of both. But I have no idea if it is possible or > useful. I just told you so in case. > >> I made some changes if file, but cant figure out how to return frame >> object. File Md2Model.c attached. > Sorry, I forgot a line: > > BEGIN_METHOD(Md2Model_Frames_get, GB_INTEGER frame) > > // Store the frame number into the object, it will be used immediately > // by the method called on the virtual .Md2Model.Frame object. > // Maybe check that the frame number is valid now. > // And don't forget to add the 'frame' field into the object > // structure. > THIS->frame = VARG(frame); > GB_RETURN_SELF(); > > END_METHOD > > Then the Md2Model_Frame_Draw method does not take the frame number as > argument anymore. It will use 'THIS->frame' internally instead. > > Regards, > Hi Benoit, I have problems with understanding how the _get method works. After the changes my model seems stuck at frame[0] and I know I have to pass the frame number to my model but don't know how. Thanks, Tomek.