History: Gorilla
Source of version: 9
Copy to clipboard
!!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.
{maketoc}
!!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|overlay)) form (2D), or attached to a ((-SceneNode|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".
* [http://github.com/betajaen/gorilla/zipball/master|Download] - A neat package
* [http://github.com/betajaen/gorilla|Repository] - Gorillas source code on GitHub
!!Code example
Using Gorilla is really easy, here is how show and update the FPS on the screen:
{CODE(wrap="1", colors="c++")}
mGorilla = new Gorilla::Silverback();
mGorilla->loadAtlas("dejavu");
mScreen = mGorilla->createScreen(mViewport, "dejavu");
mFPS = mScreen->createCaption(14, 10,10, "");
...
mTimer += evt.timeSinceLastFrame;
if (mTimer > 1.0f / 60.0f)
{
mTimer = 0;
mFPS->text("FPS: " + Ogre::StringConverter::toString(mWindow->getLastFPS()));
}
{CODE}
Other information can be read in the [http://github.com/betajaen/gorilla/blob/master/README.md|very long readme] file and [http://github.com/betajaen/gorilla/blob/master/GORILLA_SCHEMA.md|gorilla schema].
{TRANSCLUDE(page="seebox")}
* [http://www.ogre3d.org/forums/viewtopic.php?f=11&t=59984|Gorilla forum topic]
* [http://www.ogre3d.org/addonforums/viewtopic.php?f=8&t=14215&p=80448#p80114|MogreGorilla] - a wrapper for ((Mogre))
* [http://www.ogre3d.org/addonforums/viewtopic.php?f=8&t=14663|Gorilla.NET] - a port for Mogre
* [https://github.com/merlinblack/Game-Engine-Testbed/blob/master/media/src/packatlas.lua|Lua script to put images into an image atlas]
** [http://www.ogre3d.org/forums/viewtopic.php?p=422020#p422020|forum post] with more details
* [http://www.ogre3d.org/forums/viewtopic.php?f=11&t=41365|Canvas] - An other 2D-rendering engine for Ogre
* ((-GUI|GUI)) - An overview of GUI systems for Ogre
{TRANSCLUDE}
!!Screenshots and Videos
{img fileId="2021"}
{YOUTUBE(movie="http://www.youtube.com/watch?v=e78Hfo5rIyU",allowFullScreen="n")}{YOUTUBE}