rapp icon indicating copy to clipboard operation
rapp copied to clipboard

Cross-platform entry point library

Build Status Build status License

rapp is a library that provides cross-platform application entry point and additional functionality. rapp is heavily based on bgfx examples entry point code that can be found here. Graphics code is still bgfx based but..

...dependecy on bx and bgfx has been removed by aggressively copying code and by a special feature of build system that allows to have the same library in a 'solution' with different configurations.
To clarify, in the screenshot below first sample (command line) links against rapp and rbase while the second one (graphics) links against rapp_bgfx, rbase, bx, bimg and bgfx - this is all automated.

Thanks to multiple configurations per project feature of build, script taking care of this is very short and can be seen here, basically it just enables a library wide define.

Features

rapp currently has the following functionality:

  • Applications written as classes with init/shutdown/suspend/resume functionality
  • Command line (tools, unit tests, etc.) or graphics applications (games, etc.)
  • Custom commands
  • Input controllers (mouse, keyboard, gamepad, etc.) with input binding callbacks and debug visualizations
  • Ability to run code on main/message loop thread
  • Job scheduler with job stealing for fine grained parallelism
  • ImGui and NanoVG integration
  • Quake like console - ImGui based
  • Multiple applications in one binary
  • Window functions

Here's a screenshot of a bgfx sample showing input debugging, ImGui dialog and Quake like console as well as NanoVG shape (eyes):

Platform support

Input (KMG) Threading Console Graphics
Windows ✓✓✓
Xbox One ✓✓✓
PlayStation 4 ✓✓✓
Linux ✓XX
Android XXX ?
OSX ✓✓X

✓ - Working
X - Not yet implemented
? - Not supported

Platforms with partial implementations or not tested: iOS, UWP, FreeBSD
Input (KMG) stands for Keyboard, Mouse and Gamepad

Source Code

You can get the latest source code by cloning it from github:

  git clone https://github.com/milostosic/rapp.git 
  

Dependencies

Dependencies can be obtained by cloning the following repositories:

git clone https://github.com/milostosic/build.git
git clone https://github.com/milostosic/rbase.git

To build samples based on bgfx, clone the following repositories:

git clone https://github.com/bkaradzic/bgfx.git
git clone https://github.com/bkaradzic/bimg.git
git clone https://github.com/bkaradzic/bx.git

Author

The author of rapp is Milos Tosic

License (BSD 2-clause)

Copyright (c) 2018 Milos Tosic. All rights reserved.

https://github.com/milostosic/rapp

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

   1. Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.

   2. Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.