History: Gorilla
Preview of version: 1
- «
- »
Overview
Gorilla is a 2D drawing engine for Ogre, which can be projected into 3D space, or onto the screen as a 2D overlay, it comes in two files Gorilla.cpp and Gorilla.h. Gorilla is intended to substitute the Ogre overlay system, and to provide a good framework and basis for any Ogre programmer to build their HUD or GUI system upon.
Features
Gorilla is designed for speed, thus it uses Texture Atlases, Caching and tries to render everything in one batch. Gorilla screens can be either in an overlay form (2D), or attached to a SceneNode (3D).
Gorilla can draw the following types of shapes:
- Filled (Solid, Gradient or Sprite-based) Rectangles (Canvas Rectangles)
- Outlined Rectangles (Canvas Boxes)
- Lines with n-thickness (Canvas Lines)
- Sprites (SpriteLayer Sprites)
- Plain and formatted text (Canvas Captions and Text)
Gorilla only uses Ogre as a dependency, and is developed with Ogre 1.7 in mind; but should work with any 1.x version.
Gorilla is released under the MIT licence.
Downloads
Gorilla comes in two files, but also comes with a sample image and gorilla file called "dejavu".
- Download - A neat package
- Repository - Gorillas source code on GitHub
Code example
Using Gorilla is really easy, here is how show and update the FPS on the screen:
mGorilla = new Gorilla::Silverback(); mGorilla->loadAtlas("dejavu"); mScreen = mGorilla->createScreen(mViewport, "dejavu"); mFPS = mScreen->createText(10,10, "", 15); ... mTimer += evt.timeSinceLastFrame; if (mTimer > 1.0f / 60.0f) { mTimer = 0; mFPS->text("FPS: " + Ogre::StringConverter::toString(mWindow->getLastFPS())); }
Other information can be read in the very long readme file and gorilla schema.
See also
- Gorilla forum topic
- Lua script to put images into an image atlas
- forum post with more details
- Canvas - An other 2D-rendering engine for Ogre
- GUI - An overview of GUI systems for Ogre
Screenshots and Videos