On Wed, Dec 02, 2009 at 04:21:10PM +0100, 42Bastian wrote: > Hi Julien > > > Are you using SDL or OpenGL mode? The stock event loop is documented > > SDL.
So there is no GL available? My guess is that rendering the GUI in software will just monopolize the processor, unless you reduce the refresh rate significantly. > > at: http://wiki.libagar.org/wiki/Custom_event_loop. > > Yes. I have seen it. And I see it calls every x cycles AG_WindowDraw(). > Somewhere there was a nDirty counter, and I wonder why it is != 0 even > though there is no action. > Or do I have to remove the "window-showed" event posted by > AG_WindowShow() manually ? Yes, this is the expected behavior. nDirty is the number of video regions queued for update. There is no need to remove events manually. > > The huge RAM usage sounds suspicious, Agar uses very little RAM for > > its own purposes. > > I did some measurements and indeed SDL allocates 155K (w/o FB memory !) > whereas Agar only 70K. > > BTW: The massive use of realloc() is disturbing on fix-buffer allocator > systems :( There was some discussion of using user-configurable memory pools to accomodate things like mission-critical systems with limited memory. I guess it would help in this case too. I think this should be addressed on a case by case basis. > > If you have a hardware-accelerated GL available, > > I'd recommend trying Agar-1.4 (svn sources), compiled without SDL. > > Concerning Agar-1.4, how can I check it out, I've seen no svn-path. > (BTW: Why don't you provide a daily/weekly snapshot of the trunk ?) > > I looked in the branch there the gi looked promissing. But it seems to > be canceled in the trunk. > A dummy driver like SDL provides would be nice where one can see what > minimum function one needs to provide. > > Anyway: It took me only 2 days porting it, so it is pretty portable ! The svn path is listed on the agar "Download" page: http://dev.hypertriton.com/agar/trunk The "agar14" branch was abandoned a while ago. Agar-1.4 development is taking place in trunk (and 1.4 should be released very shortly). All SDL code is now encapsulated in gui/drv_sdlfb.c and drv_sdl_common.c, and new drivers should be added to gui/drv.c. _______________________________________________ Agar mailing list [email protected] http://libagar.org/lists.html
