All Projects → CobaltXII → boiler

CobaltXII / boiler

Licence: MIT license
The Boiler framework, including sample projects

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language

Labels

Projects that are alternatives of or similar to boiler

tnt
A 2d Game Engine written in C++20.
Stars: ✭ 30 (+100%)
Mutual labels:  sdl2
ness-engine
NessEngine is a 2D rendering engine for games
Stars: ✭ 32 (+113.33%)
Mutual labels:  sdl2
sdl2test
🎬 Testing SDL2 with V, Rust, C/++ : Nuklear, ImGui, TTF, 2D/3D, joystick, sounds, music, ...
Stars: ✭ 17 (+13.33%)
Mutual labels:  sdl2
SDL
Swift library for SDL2
Stars: ✭ 32 (+113.33%)
Mutual labels:  sdl2
sdlpp
C++ wrapper for SDL2
Stars: ✭ 37 (+146.67%)
Mutual labels:  sdl2
sdl2-image
Haskell bindings to SDL2_image.
Stars: ✭ 16 (+6.67%)
Mutual labels:  sdl2
rust to js
An example of Rust code that compiles to javascript.
Stars: ✭ 26 (+73.33%)
Mutual labels:  sdl2
BonEngineSharp
A simple and fun SDL-based game engine in C#.
Stars: ✭ 16 (+6.67%)
Mutual labels:  sdl2
ruby-imgui
Yet another ImGui wrapper for Ruby
Stars: ✭ 42 (+180%)
Mutual labels:  sdl2
payton
Payton! Kickstart any 3D OpenGL + GTK Ideas in a few seconds!
Stars: ✭ 45 (+200%)
Mutual labels:  sdl2
OCamlSDL2
OCaml interface to SDL 2.0 (for Linux, Windows, MacOS, and ChromeBook)
Stars: ✭ 42 (+180%)
Mutual labels:  sdl2
SimpleRemoteDesktop
Remote desktop client based on h264 steam. like splashtop and other
Stars: ✭ 17 (+13.33%)
Mutual labels:  sdl2
DeccanEngine
💠 Deccan Engine is an Open-Source Cross-Platform 2D Game Engine written in C11. Powered by SDL2.
Stars: ✭ 30 (+100%)
Mutual labels:  sdl2
choria
Finally, an MMORPG that's all about grinding and doing chores.
Stars: ✭ 19 (+26.67%)
Mutual labels:  sdl2
OpenHSP
Hot Soup Processor (HSP3)
Stars: ✭ 120 (+700%)
Mutual labels:  sdl2
sdl12-compat
An SDL-1.2 compatibility layer that uses SDL 2.0 behind the scenes.
Stars: ✭ 99 (+560%)
Mutual labels:  sdl2
ArchGE
A 2D and 3D C++ Game Engine using SDL2 and OpenGL
Stars: ✭ 15 (+0%)
Mutual labels:  sdl2
cl-sdl2-tutorial
SDL2 examples in Common Lisp based on Lazy Foo tutorials.
Stars: ✭ 55 (+266.67%)
Mutual labels:  sdl2
faur
⚒️✨ My personal C games framework. 2D graphics, sound, inputs, states, ECS, and misc utils for data, files, math, memory, strings, time, and more. Builds for Linux, Windows, Web, and embedded devices.
Stars: ✭ 55 (+266.67%)
Mutual labels:  sdl2
QtDemos
This is a demo about Qt5, including Qt Custom Widget, Qt Multithreaded Downloader, QML Video Player(using OpenGL, FFmpeg and SDL2)
Stars: ✭ 18 (+20%)
Mutual labels:  sdl2

Boiler

Boiler is a graphics and rasterization framework built on top of SDL2.

Summary

Boiler is a small, header-only graphics, audio and rasterization library for creating cross-platform applications based on SDL2. Boiler was created to provide a simple, fast and extensible interface to the SDL2 library.

Boiler is oriented around per-pixel rasterization. It does not use any SDL2 graphics routines, such as SDL_RenderDrawLine or SDL_RenderCopy. Instead, it implements rasterization functions itself, to provide an extensible and flexible graphics interface.

Usage

Boiler is an object-oriented library. It provides a base class with all the implemented drawing routines and class members. The standard header also defines many global functions for convenience.

To set up Boiler, you must create your own class that inherits from the generic boiler class. You may then override steam to initialize the underlying SDL2 window. You should also override draw, and optionally keydown and keyup and other functions as well.

To use Boiler, you must create a default instance of your child class which inherits from boiler. You then call make, which will return a non-zero value if it fails. After that, you should call engine, which will execute until the program exits. After calling engine, calling sweep is good practise to ensure all memory is freed.

You can find a few well commented and detailed (yet simple) demonstrations using the Boiler framework in the demos directory. These demonstrations showcase the simplicity of the framework.

You can create a window that displays the default gradient sample using this simple code

#include "boiler.h"

struct game: boiler
{	
	void steam() override
	{
		width = 800;
		height = 600;

		title = "Software renderer (using Boiler)";
	}
};

// Entry point for the software renderer.

int main(int argc, char** argv)
{
	game demo;

	if (demo.make() != 0)
	{
		std::cout << "Could not initialize Boiler." << std::endl;

		return 1;
	}

	demo.engine();
	demo.sweep();

	return 0;
}

Building

To build any project that uses the Boiler framework, you must link the SDL2 library. There are many tutorials that show you how to do this. For Clang or GCC, the following command should suffice

clang++ my_project.cpp -std=c++11 -lSDL2 -Ofast

License

The Boiler framework and all other included projects are licensed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].