Gorilla         2D drawing engine for Ogre
Print

Image
Current Maintainer: User:Betajaen
Project: External OGRE Project
Type: OGRE Library
License: MIT
Supported Platforms: Windows / Linux / Mac OS X
Sources: Github Repository(external link) | Direct Source Download(external link)
Status and bug reports: Github(external link) | OGRE Forum Topic(external link)


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.

Eyecandy

 

Flash player not available.

 

Utility

 
BFG (Bitmap Font Generator)

The BFG (Bitmap Font Generator) was originally created by Calder (Author of QuickGUI). This modified version allows to create fonts ready for Gorilla as well as tighly pack multiple font in the same bitmap and .gorilla data file.

You can download both a Win32 binary exe, and the source from bitbucket: https://bitbucket.org/c6burns/bfg(external link)

The following command line arguments are available:

-a <file> : specify an alphabet file. alphabet needs to be ASCII code ascending order.
-t <size> : Specify the output square texture size (ex: 256)
-f <format> : Specify the output data file format ("none", "quickgui", "gorilla")
-o <width> : Outline width. Leave to 0 for no outline
-i <intensity> : Intensity modifier
-c <color> : Main glyph color (ex: "0 1 0")
-C <color> : Outline color (ex: "0 1 1")
-s <size> : Font point size
<fontfile> : Specify input font file

 
A bitmap and data file containing a unique font can be generated like these two example:

fontgen -i 2 -C "1 0 1" -o 3 -c "0 0 1" -f gorilla -s 24 segoepr.ttf
fontgen -c "0 0 1" -f gorilla -s 18 segoepr.ttf

 
In order to generate multiple font type/size packed in the same bitmap and data file, a first command line must be entered to instruct BFG that we will generate multiple font. The first command line requires only the following 2 arguments:

fontgen -f gorilla -t 512

 
Once the first command line is entered, BFG will ask to enter each argument list for each font. Enter a final carriage return on empty line to finish and generate the file.
Here is some example font argument list:

-o 2 -i 1 -s 18 -c "1 1 0" -C "1 0 0" segoepr.ttf
-o 1 -i 2 -s 24 -c "0 0 1" -C "1 0 1" carolingia.ttf
-o 2 -i 3 -s 36 -c "1 1 1" -C "0 0 0" courbd.ttf

 
Once you have your new generated PNG and gorilla files, just copy them to one of your Ogre3d resource directory and you are ready to use them in gorilla.


Contributors to this page: c6burns837 points  , zarlox56 points  , spacegaier6073 points  , RandomCitizen6 points  , pestaa172 points  , jacmoe180265 points  , ekow66 points  and Beauty14565 points  .
Page last modified on Monday 01 of February, 2016 00:46:26 UTC by c6burns837 points .


The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.