Using CEGUI with Producer and OpenGL

From CEGUI Wiki - Crazy Eddie's GUI System (Open Source)
Revision as of 23:00, 20 August 2005 by Granx (Talk | contribs) (Using CEGUI via Producer)

Jump to: navigation, search

Producer is a cross platform toolkit, best explained on its website. I use it for many things, but creating a window, or Render Surface, is the most fundamental task. CEGUI requires knowledge of the window, mouse, and keyboard interaction. I will show how you can do that with some example code.

Defining a Producer Viewer

The first step is to create some sort of "viewer" with Producer, basically make a Producer::RenderSurface and a Producer::KeyboardMouse. Both of these classes are necessary for using CEGUI correctly. So, here is some example viewer code:

  1. include "Viewer.h"

Viewer::Viewer() : _camera(new Producer::Camera()), _rs(0), _kbm(0) {

 _rs = _camera->getRenderSurface();
 _kbm = new Producer::KeyboardMouse(_rs.get());

}

Viewer::~Viewer() {}