From: Branan R. <br...@gm...> - 2008-08-23 23:39:42
|
There's no point passing a *out variable. The generation function has to allocate memory for the structure members anyway, so it may as well allocate the whole structure. And if we return a structure like that, do we have a glsDrawShape() function, or do we make the user draw it? On Sat, Aug 23, 2008 at 4:37 PM, Henri Häkkinen <hen...@gm...> wrote: > > > On Sun, Aug 24, 2008 at 2:21 AM, Branan Riley <br...@gm...> wrote: >> >> I'm going to start on geometry generation functions. I think sphere, >> cube, cylinder, and cone are good to start with. >> >> I do have a couple questions about how we want to use these, though. >> >> 1) Should they return data in a pre-defined format, so that the user >> has to set up the VBOs to send the data (reinforcing the steps needed >> to get geometry to the GL), or should they handle it automatically (to >> make things simpler for code that's demonstrating shader effects) >> >> 2) What should the prefix be? I'm thinking gls for "OpenGL Shape" >> >> 3) If we want to have it return data, what's a good format for the data? >> > > I propose a some sort structure or an object which the functions return. > > typedef struct GLSshape_s { > ... > } GLSshape; > > void glsCreateSphere (GLSshape *out, GLfloat radius); > ... > > Members are public so that the caller may directly access them. We could > later extend this library to load .obj files. > >> >> Branan >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> Glsdk-devel mailing list >> Gls...@li... >> https://lists.sourceforge.net/lists/listinfo/glsdk-devel > > > > -- > Henri 'henux' Häkkinen > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Glsdk-devel mailing list > Gls...@li... > https://lists.sourceforge.net/lists/listinfo/glsdk-devel > > |