All About RenderTargets

From CEGUI Wiki - Crazy Eddie's Gui System for Games (Open Source)

Jump to: navigation, search

Written for CEGUI 0.7


Works with versions 0.7.x (stable)

Works with latest CEGUI stable!

subtitle: CrazyEddie broke my renderer

This article is intended to be a fluid piece that I will change and update as the work on the Renderer modifications is done. It's not intended as a dry, serious piece, although any technical details and such like should all be accurate.

The general goal of these modifications is to complete the 'Renderer enhancements' item from the old 0.6.0 roadmap. These items were described as:


Contents

Renderers - times are changing

To date, all rendering was done by the renderer - that's why it had that name. The new RenderTarget system breaks this functionality out of the renderer and places it elsewhere. Under the new arrangements the renderer is set to become more of a utility and factory class; mainly creating various objects that target the associated underlying API or engine, and offering support functions as required.

What is a RenderTarget

A RenderTarget is a class of objects that can be the target of rendering operations (duh!). Basically it's a generic interface to 'anything' that can be rendered to (obviously a concrete class must be implemented to support it). In general there are, or will be, two broad types of RenderTarget. The first is a 'view port' type target - this directs rendering to the screen (or a portion of it). The second type is a 'texture' type target - this directs rendering to a texture of some kind. Texture targets are useful within CEGUI for caching the imagery of window objects, though outside of CEGUI there may be various more exciting uses.

Multiple GUI Roots

The main other addition will be that the system will eventually support multiple GUI 'roots'. Each root window will have its own root RenderTarget and so offer the ability to have different GUIs in different viewports, or maybe targetting textures to have GUIs appearing on items 'in game'.

Code Location and Status

The work on this renderer rewrite was eventually split into another branch (renderer-rewrite-devel) and started again! However, the major implementation work has been completed and the code merged back into the unstable trunk. Currently all renderers are functional with the exception of the DirectFB module; I hope to get this working by the time we need to release 0.7.0. There are large numbers of issues with the code currently (trunk is not referred to as unstable just for fun, you know), though over time these should get addressed and CEGUI will be all the better for it.

Discussion / Bug Reports

If you wish to offer some opinion (but not to nag me) about some aspect of this area of development, or report some bug that is directly related to this area of development, please post in the following forum thread http://www.cegui.org.uk/phpBB2/viewtopic.php?p=13606.


Mini FAQ

This is a mini FAQ. It's kind of a repository for questions and comments that are likely to come up regarding the RenderTarget changes in CEGUI. It's not exhaustive, and it's not supposed to be.

Why are you doing this?

Isn't this just some quick fix? A reaction to other projects?

So, why now?

You broke all the Renderers!

Why did you do the OpenGL renderer first? I do not use this renderer!

When will the Renderer for <my engine> be updated?

I have no RTT support, this means I will no longer be able to use CEGUI!

Now rendered imagery is cached, you'll be using up all my video RAM!

I have volatile window content. since you're caching to textures, my performance will be worse!

I have found a bug! Are you interested?

Is CrazyEddie back in charge of CEGUI?

I don't like CEGUI. It sucks, and CrazyEddie sucks too!

Personal tools
Namespaces
Variants
Actions
Main Menu
Community
Documentation
Toolbox