Go to the previous, next section.

Easy initialization of AA-lib

If you want to initilialize AA-lib as a graphics library it should look like:

#include <stdio.h>
#include <aalib.h>
aa_context *context;
void main(void)
{
  context = aa_autoinit(&aa_defparams);
  if(context == NULL) {
    fprintf(stderr,"Cannot initialize AA-lib. Sorry\n");
    exit(1);
  }
  ...
  aa_close(context);
}

This code will do all autodetection/initialization stuff for you and it will fire up AA-lib (using default parameters). However it is not a common situation you should check a possible fail.

Go to the previous, next section.