Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Foundational headers for C programs.

peedromarinhow/foundation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Foundation

This is the scaffold for making real-time and single execution programs in C in windows (no other OSs suported yet). This projects reuses and adapts code from https://github.com/Mr-4th-Programming/mr4th, https://github.com/vurtun/tau and https://youtu.be/NG_mUhc8LRw.

Example program:

#define RENDER_IMPL
#include "render.h"

#define FOUNDATION_IMPL
#include "foundation.h"

int main(int Argc, char **Argv) {
  SysInit(Argc, Argv);

  pool *Pool = PoolReserve(0);

  window   *Wnd = WndInit(gfx_api_Opengl, 0, 0, -1, -1);
  renderer *Ren = RenInit(Pool, Wnd);

  while (!Wnd->Finish) {
    WndBeginFrame(Wnd);
    WndBeginRendering(Wnd);
    RenDraw(Ren);
    WndEndRendering(Wnd);
    WndEndFrame(Wnd);
  }

  RenEnd(Ren);
  WndEnd(Wnd);
  SysEnd();
}

output.gif

About

Foundational headers for C programs.

Topics

Resources

Stars

Watchers

Forks

Languages