Hi, The demo source is available at https://thewhitelion.kilnhg.com/Code/webgl/Group/Trunk
To build it, mkdir bin; mkdir obj; gprbuild The package Gnoga.Gui.Element.Canvas.Context_WebGL (in the ext directory) is generated from the GL spec (in ES 2.0 API mode), with a few extra subprograms implemented in the private child Gnoga.Gui.Element.Canvas.Context_WebGL.Support Normally each API call is sent individually to the browser, except that after a call to Begin_Render, the calls are collected in a string vector, and sent all at once when End_Render is called. At the moment this has to be explicit, but later on it should be done automatically around some sort of GLUT-like render callback. There's a configuration file which specializes some of the bindings. For example, a call to glTexParameteri can inconveniently apply to different texture parameters which expect values from different groups. So the generator creates separate procedures, called Texture_Wrap_T, Texture_Wrap_S, Set_Texture_Mag_Filter and Set_Texture_Min_Filter, all using the appropriate enumeration. Finally, there's nothing deep about the choice of generated names. In particular, I'm not sold on using GLfloat, GLint, etc. I think just Float would be fine; a generic could be overkill (since it's all going to an 'Image function, it certainly wouldn't hurt anything). I'd certainly love to here what you think! cheers, Fraser. On Fri, 22 Feb 2019 at 09:26 Fraser Wilson <[email protected]> wrote: > A trivial GLUT layer would not be too difficult I think. Could either > simulate the render callback from a task, or implement a proper callback > from the browser. Opening a window would create a canvas. > > > On Fri, 22 Feb 2019 at 09:11, Reinert Korsnes <[email protected]> > wrote: > >> And including FreeGLUT? >> Then I would reach a goal for my project :-) >> >> reinert >> https://korsnesbiocomputing.no/ >> >> On 22/02/2019 07:44, Gautier de Montmollin wrote: >> > Wow! >> > >> > If you find a way to adapt pure GL code to Gnoga-WebGL, you have a 3D >> > engine in Ada, for free, for Gnoga: >> > >> > https://globe3d.sourceforge.io/ >> > >> > ... then, a multiplayer 3D game is a real possibility :-) >> > >> > G. >> > >> > _______________________________________________ >> > Gnoga-list mailing list >> > [email protected] >> > https://lists.sourceforge.net/lists/listinfo/gnoga-list >> > >> >> >> >> _______________________________________________ >> Gnoga-list mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/gnoga-list >> >
_______________________________________________ Gnoga-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gnoga-list
