Here's a small project example:
// Includes, namespace and prototypes
#include "template.h"
using namespace AGK;
app App;
int spr;
// Begin app, called once at the start
void app::Begin( void )
{
agk::SetVirtualResolution(800,600);
spr = agk::CreateSprite(0);
agk::SetSpriteSize(spr, 100, 100);
agk::SetSpriteColor(spr, 255, 0, 0, 180);
}
// Main loop, called every frame
void app::Loop ( void )
{
agk::SetSpritePosition(spr, agk::GetPointerX(), agk::GetPointerY());
agk::Print("Click to exit");
// exit upon a click
if(agk::GetPointerPressed()) PostQuitMessage(0);
agk::Sync();
}
// Called when the app ends
void app::End ( void )
{
if(agk::GetSpriteExists(spr)) agk::DeleteSprite(spr);
}