#include "common_linux.h" int main(int argc, char *argv[]) { RGL_Context ctx; RGL_Buffer buf; buf.width = 800; buf.height = 600; ArenaInit(&ctx.queue.arena, 0); ctx.queue.commands = (RGL_Command *)ctx.queue.arena.data; BufferAlloc(&buf); ctx.color = RGL_COLOR(255, 255, 255, 255); RGL_BeginPath(&ctx, PathStroke); RGL_PathMoveTo(&ctx, 0, 0); RGL_PathMoveTo(&ctx, 799, 599); RGL_PathMoveTo(&ctx, 799, 0); RGL_PathMoveTo(&ctx, 0, 599); RGL_EndPath(&ctx); RGL_Draw(&ctx, &buf); if (WritePPM(buf, "output.ppm")) return 1; ArenaDestroy(&ctx.queue.arena); BufferDestroy(&buf); return 0; }