Giter VIP home page Giter VIP logo

rt2d's Introduction

RT2D

RT2D is a RealTime 2D framework, based on somewhat 'modern' OpenGL (2.1+). It compiles and runs on Mac, Linux and Windows.

Compatibility is chosen over features. Readability over efficiency. Simplicity over speed. There's no fancy OpenGL stuff here. Just update and render scenes with entities that contain (colored) sprites, spritesheets, spritebatches, pixelbuffers, fonts and lines.

OpenAL (audio) and Box2D (physics) are not integrated into RT2D. Explicitly link to them if you want to use them. RT2D is just a renderer. Look in CMakeLists.txt for examples.

Compiling

Use cmake to create your project files in a separate build directory.

You should always be able to delete the build directory without losing your work. Whatever you do, work in your src directory. That's probably start.

Use the OPTION settings in CMakeLists.txt to decide what projects and libraries to compile.

Documentation

To generate the documentation, run doxygen (with Doxyfile as input) in the root directory of this project:

doxygen Doxyfile

Then open documentation.html in the doc directory.

Linux

On Debian-based Linux, install the following libraries:

sudo apt install git cmake doxygen g++
sudo apt install libgl1-mesa-dev libglu1-mesa-dev
sudo apt install libxrandr-dev libxi-dev libxinerama-dev libxcursor-dev

Run bootstrap.sh or:

mkdir build
cd build
cmake -Wno-dev ..
make

Then you can run the demo:

./demo

Make sure to add any new files you create to the CMakeLists.txt file.

Mac OS X

Install the following:

  • XCode + commandline developer tools
  • git
  • cmake
  • doxygen

Run bootstrap.sh or:

mkdir build
cd build
cmake -Wno-dev ..
make

Then you can run the demo:

./demo

Make sure to add any new files you create to the CMakeLists.txt file.

MS Windows (VS2015)

Install the following:

  • Visual Studio 2015 Community Edition (VS2013 also works fine) + Visual C++ (do a custom install)
  • git
  • cmake
  • doxygen

In the powershell, run:

mkdir build
cd build
cmake -Wno-dev ..

Then doubleclick the rt2d.sln file in the build directory. Right-click the 'start' directory in Visual Studio and select 'Set as StartUp Project'. Then press ctrl-F5.

Make sure that when you add new files within Visual Studio, you move them to the correct directory in src and add them to the CMakeLists.txt file.

Libraries

Links

The CMakeLists.txt file and rt2d/shader.cpp are based on the ones found here: http://www.opengl-tutorial.org/.

If you're having trouble compiling this project, follow instructions on http://www.opengl-tutorial.org/. Once that compiles, this will probably also compile.

License

Copyright 2015 Rik Teerling [email protected]

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

rt2d's People

Contributors

rktrlng avatar meruiden avatar vzout avatar ultragamecoder avatar devdanielsun avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.