Date (UTC) | User | Event |
---|---|---|
2025-03-03 20:47 | fluffrabbit | Reference refs/heads/master created (999b52a93401807649ad0833d6a4263141c4dfe2) |
2025-03-03 20:42 | fluffrabbit | Repository has been created |
FGC (fgc.h) is a 3D graphics library written in C99. It can be used as a foundation for building graphics applications. Currently supports PC and (potentially) Android targets. Font rendering (fgc_font.h) is being worked on as a separate library.
CFPS is a game engine built on top of FGC.
Keep it lightweight and simple above all else. Use mature tools and GL3/GLES3 for compatibility. Make it feel good to use and easy to change.
FGC provides a public API that is primarily designed to display 3D graphics with OpenGL ES 3.0. However, it utilizes abstracted generality in the forms of internal helper functions and external helper libraries. These helpers do mundane things like context initialization and image loading. Advanced features like GPU selection are ignored. The public API provides a high level of abstraction to make graphics application development go faster.
For example, the internal function _fgcLoadSurface
loads
an SDL_Surface
into client memory, utilizing commands from
SDL, SDL_Image, and stb_image, depending which headers were included
before fgc.h
. The .bmp
format is always
supported, but SDL_Image and stb_image each allow loading
.png
, .jpg
, and other formats.
fgcLoadTexture
uses _fgcLoadSurface
internally
to load textures.
Each FGC API call represents dozens or even hundreds of lines of
code. This high level of abstraction makes things simple for you, the
application programmer. If you need more advanced features, you can
modify the library. API documentation is provided in fgc.h
.
cfps.c
provides an example of usage.
Android earned persona non grata status in the larger software development community by being a royal pain to work with. Fortunately, FGC apps run on Android if you have 8 GB of free space for compilation.