On Thu, May 08, 2008 at 04:27:39PM +0000, Laszlo Menczel wrote: > Julien Nadeau <[EMAIL PROTECTED]> writes: > > > The location $PREFIX/include/agar/agar/ is actually correct. This is > > done so that agar does not force you to -I$PREFIX/include in your > > application, since that may not be desirable. `agar-config --cflags` > > will output -I$PREFIX/include/agar/ so the #includes should work fine. > > OK, I understand that, but IMHO it differs from the standard (expected) setup. > AFAIK one usually uses the option '-I/usr/local/include' (or equivalent) in > the > makefile, and in the source files refers to subdirectories within this > location > (if necessary). Like it is done with OpenGL where you use #include <GL/xxx.h> > (the same is true for OpenAL and SDL, just to mention a few cases). If you > stick > to this principle, then you don't have to specify multiple -I options and your > makefile is simpler. With the default agar setup it would be necessary to use > #include <agar/agar/xxx.h> or use multiple -I options. BTW, I don't really > understand why putting the headers in '/usr/local/include/agar' would force me > to use '-I$PREFIX/include' (provided that CFLAGS is correctly set).
Oh, but you should not have to know or care where the Agar includes are installed! You should use the output of `agar-config --cflags` when compiling. You will certainly encounter a lot of problems on many platforms if you don't use `sdl-config --cflags` to compile SDL applications, and it is the same with Agar. Besides the -I options, foo-config scripts can also output certain needed -D flags that are completely platform-specific. > Anyway, I managed to compile the widgets demo and I am quite impressed with > your > library. I am glad that I found it, since I program exclusively in C (no C++ > sh#$t for me, thank you). I have tried a couple of alternatives (Graphapp, > IUP/CD, Gtk+, MGUI, GLUI, etc., even Tcl/Tk and some C++ stuff like FLTK) but > none of them were entirely satisfactory. I'm glad you like it! > As for the use of OpenGL: It is not really the hardware acceleration that > makes > it attractive. OpenGL is present on most of the PCs (mostly for games :-), so > if > Agar uses pure OpenGL w/o the SDL library, I don't have to distribute SDL with > my app > (less stuff to maintain and care about). Yes, but using OpenGL in software mode, on most platforms, is probably going to be much slower than Agar's SDL mode, reducing or responsiveness of the GUI and in my experience making it unusable. For that reason I can only recommend distributing your application with support for both modes. And hardware acceleration, where available, is a huge benefit even if you are not writing a 3D application or anything that is graphics intensive. In software mode, most of your CPU time is wasted on graphics operations. With a hardware accelerated OpenGL, your CPU is almost entirely freed up for your actual application to use. _______________________________________________ Agar mailing list [email protected] http://libagar.org/lists.html
