SDL2 + OpenGL ES 3.0 - Android + Windows/Linux target lightweight game library
See TODO for development roadmap.
You need to install all of the following on your development machine.
- SDL2
- SDL2_image
- SDL2_mixer
- freetype
- cglm
- vector_c
- hashmap_c
- texpackr
- GLAD - for ease of installation, use its web service to generate OpenGL ES 3.0 then put its only generated header directory (both
glad
andKHR
) into your system (i.e./usr/local/include
)
- Apart from normal image file formats, support loading DDS file which encapsulates compressed texture format of S3TC for PC, or ETC2 (and its variants ETC2_RGB, ETC2_RGBA, and ETC2_RGBA1) for Android)
- Terrain generation and rendering
- Skybox
- Forward rendering with multiple light source
- Per-pixel lighting shader
- Support loading, and rendering .obj model file
- Support text rendering with input .ttf file
- ... (more to be added)
Build system is based on autotools.
./autogen.sh
./configure
make
make install
- to install krr (as static/shared library, along with header files) to your systemmake samples
- to build all the sample programs insamples/
directorymake sample-...
- to build specific sample program, but you need to executemake
first once. The list of available sample program listed next section
Take benefit from another two of our projects to help ease in cross compiling for Android. Check the following two projects
- androidbuildlib - help in cross compile an autotools-based library project to Android targeting multiple architectures (abi)
- setandroidbuilddev - help to set/unset build related environment variable for cross compiling to Android in case you don't use
androidbuildlib
and want to do some manual task
The list of available sample to build in samples/
.
doublemulticolorshader
- custom double color shaderrotatingcube
rotatingplane
readobjfile_manual
- read .obj file while we build VBO as part of VAO to draw loaded .obj file manually wrapping aroundSIMPLEMODEL
readobjfile
- more automatic after loading .obj file to render on screenadvanced_model
- load .obj model then render with some other features on topheadless
- headless program without GUI window, it will load .obj model then shows it while rotating the model, then after enough frames has been rendered, it will take snapshot of screen then finally write as output .png fileheadless-snapshot.tga
terrain
dds
- reading dds texture (mipmaps, with alpha, in format DXT5), then render on screen. DDS header info will be shown on console.
Testing models
- Stall (.obj) model and texture, Stanfort Dragon (.obj) model which grabbed from Thinmatrix tutorial - the former is modified for its scaling, facing orientation, and exported texture.
- Horse model (.obj) - we've modified its scaling, facing orientation, and exported texture externally.
- Zombie sprite is copyrights and owned by Secrete Character, from Zombie Hero : Kiki Strikes Back.