Skip to content

GValiente/torrijas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Torrijas

Torrijas is a multi-platform C++11 library for building 2d games and other graphical applications with vector graphics.

It is based on NanoVG for the graphics rendering. It works on Linux, OS X and Windows.

screenshot of some text rendered with the sample program

Usage

The Torrijas API is modeled loosely on Cocos2d API. If you know Cocos2d-x, you're up to speed with Torrijas in no time.

Build Requirements

  • Ubuntu 14.04+ with gcc 4.8+
    • or Mac OS X 10.9+ with Xcode 6+
    • or Windows 7+ with Visual Studio 2015+
  • CMake 2.8+
  • GLFW3 (in Windows it should be located in C:/glfw)
  • GLEW (in Windows it should be located in C:/glew)

Building and running tests on Linux and Mac

$ cd torrijas
$ mkdir build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ make
$ cd torrijas-test
$ ./torrijas-test

Building and running tests on Windows

Well... IT WORKS, but I have it working with Qt Creator, because my Visual Studio free license has expired u_u

Expected build folder

By default, Torrijas expects to be built in a child folder of the main torrijas folder.

If you build it elsewhere, you'll get a nice crash because it isn't going to find the default font file.

You can change the default font file path in the ApplicationConfig class.

Create your own project

Make a copy of the torrijas-template folder, rename it, add it to the last line of the main CMakeLists.txt and you should be good to go.

Main features

  • Resolution independent real time vector graphics
  • Scene management (parent / child nodes)
  • Sprites and sprite sheets
  • Text with support for .ttf fonts
  • Actions (more in the future):
    • Trasformation actions: Move, Rotate, Scale, etc.
    • Composable actions: Sequence, Repeat, Reverse
    • Misc actions: CallBack
  • FrameBuffer effects
  • Mouse / Keyboard support
  • Open Source Commercial Friendly (zlib): compatible with open and closed source projects
  • OpenGL 2+ based

API Reference

Not yet :p

License

The library is licensed under zlib license

Links

  • Uses NanoVG for vector graphics rendering.
  • Uses GLFW for creating windows with OpenGL contexts and receiving input and events.
  • Uses stb_truetype (or, optionally, freetype) for font rendering.
  • Uses stb_image for image loading and writing.
  • Uses GLEW for wrangling OpenGL extensions or something.

Change log

v0.1.2

  • OPTIMIZATION: Images with opacity are now rendered with display lists if they are enabled.
  • OPTIMIZATION: Display lists are released when they are not needed anymore.
  • FIX: Text with display lists enabled can be rendered incorrectly if the glyph atlas grows.
  • OTHER: Expected build folder info added to readme.
  • OTHER: Some CLion warnings removed.

v0.1.1

  • FIX: Linux build.

v0.1

  • Initial release.

About

C++11 library for building 2d games and other graphical applications with vector graphics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages