Beauty
10-09-2010 12:04:52
The aim of this forum topic is to show you new Ogre projects,
which could be an interesting addition for Mogre.
Gorilla + Canvas - high speed display of 2D, text, GUI, pics
In the showcase forum section I found the new project
Gorilla, which seems to be interesting. It's looking nice and is optimized for high speed.
I tell you, because maybe not many people are looking to the showcase section.
Maybe somebody like it so much, that he create a wrapper or port for Mogre.
More details you find here:
http://www.ogre3d.org/forums/viewtopic.php?f=11&t=59984
Beauty
16-09-2010 14:09:57
There is also an other interesting project called
Canvas.
The advantages are:
* high speed rendering
* easy text stylizing (fonts, colours, size, italic) - also inside of a text block
* displayed containers like balloons (with floating text content)
Just run the precompiled demo
The project page is here:
http://princeofcode.com/canvas.php
The forum discussion is here:
http://www.ogre3d.org/forums/viewtopic.php?t=41365
Maybe Canvas is useful for somebody and like to wrap or port it.
If so, be welcome to publish it.
This post is just to let you know about this add-on.
(I just found it on yesterday, although it was published 2 years ago.)
What: A super-fast, lightweight, 2D-rendering engine for Ogre3D. To be used for powering simple HUDs or basic interface libraries.
Why: Existing solutions seemed a bit inefficient and I felt like tackling the issue. My implementation is able to batch all rendering into one operation, regardless of document complexity, without using any real-time texture caching.
How: The secret sauce is Atlas, a programmatic texture atlas that can pack font glyphs of multiple fonts and texture assets into a single texture. Assets are pre-loaded into an Atlas, eliminating the need for material-switching in a Canvas (allowing me to get the batch count down to one).
Screenshot: (click for bigger)
![](http://www.agelessanime.com/canvas/canvasdemo_small.gif)
Here's a screenshot of the packed Atlas texture that was generated at run-time (in about 0.03s) for the demo. It contains 4 font faces and 5 font sizes (for a total of 500 glyphs) and a single texture (the logo). Please note that most of the unused space is due to POT limitations on texture-sizes. (click for bigger)
![](http://www.agelessanime.com/canvas/atlas_packed_small.gif)
The demo itself is also a work of love; everything is data-driven, it can parse "<font></font>" tags (so that you can specify inline font styles), and I also wrote a simple multi-font text-layout implementation (see TextFlowElement).
Download the demo here.
The source is LGPL, non-platform-specific (feel free to port). All you need to build is MSVC8 and the OgreSDK (the only other dependency, FreeType, is included).
Download the source here.
amirabiri
03-02-2011 21:32:39
Wow these are a lot of small cool projects which are great for my learning C++/CLI \ wrapping skills!
I wonder though if there are any other advantages to Gorilla or Canvas other than speed compared to Ogre's overlay system?
Either way they look so simple to use and wrap that it tempts me. I'll have a look into them after I'm done with MHydrax.
Beauty
03-02-2011 21:56:50
Nice to see that you like my "news"
Ogre Overlays are very flexible and "just" some basic tools for GUI creation.
Canvas and Gorilla are more specialized and have functionality which Overlay doesn't have.
You can add text (styled by any font) without much speed loss, because all needed pixels are still in the auto-created "atlas" image. (I suppose you even don't have to add the font files.)
Canvas also has an auto-wrapping feature for a longer text, which needs line breaks. Maybe also some other features.
Start the demo application and get an impression.
All I know is from the linked topics. I never used the source code.
Beauty
16-04-2011 16:55:53
zarfius
06-05-2011 06:15:09
I'm very impressed by the Canvas demo
I'm going to have a crack at porting it this weekend.
Beauty
10-05-2011 21:32:44
Yes, Canvas looks impressive.
I look forward and wish you the best for porting the code.
zarfius
11-05-2011 12:33:57
I look forward and wish you the best for porting the code.
I have the port half done but I ran out of time on the weekend and I may not get back to it anytime soon. Besides, I ran into some issues with FreeType and I'm not sure how to solve them just yet. I believe C# provides enough font libraries to get it going without FreeType but I'd have to figure out how the code works first. If anyone's interested in continuing what I started I'd be happy to hand over the code (it's messy and doesn't compile yet though).