Difference between revisions of "Using CEGUI with Producer and OpenGL"
From CEGUI Wiki - Crazy Eddie's GUI System (Open Source)
(Using CEGUI via Producer) |
|||
Line 1: | Line 1: | ||
[http://www.andesengineering.com/Producer/ 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. | [http://www.andesengineering.com/Producer/ 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: | ||
+ | |||
+ | #include "Viewer.h" | ||
+ | Viewer::Viewer() : _camera(new Producer::Camera()), _rs(0), _kbm(0) | ||
+ | { | ||
+ | _rs = _camera->getRenderSurface(); | ||
+ | _kbm = new Producer::KeyboardMouse(_rs.get()); | ||
+ | } | ||
+ | |||
+ | Viewer::~Viewer() {} |
Revision as of 23:00, 20 August 2005
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:
- include "Viewer.h"
Viewer::Viewer() : _camera(new Producer::Camera()), _rs(0), _kbm(0) {
_rs = _camera->getRenderSurface(); _kbm = new Producer::KeyboardMouse(_rs.get());
}
Viewer::~Viewer() {}