---- Version: 0.8.2 (Build: Aug 30 2013 GNU/Linux g++ 4.6.3 64 bit) ----
---- Renderer module is: CEGUI::OpenGL3Renderer - Official OpenGL 3.2 core based renderer module. TextureTarget support enabled via FBO OGL 3.2 core implementation. ----
---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
---- Image Codec module is: DevILImageCodec - Official DevIL based image codec ----
---- Scripting module is: None ----
Currently I try to get my own drawing code into a cegui window. But I stuck on creating a working CEGUI::FrameWindow class Inheritance.
Class header
Code: Select all
#include "CEGUI/CEGUI.h"
#include "CEGUI/RendererModules/OpenGL/GL3Renderer.h"
class ceguiCircuitEditor : public CEGUI::FrameWindow
{
public:
static const CEGUI::String EventNamespace;
static const CEGUI::String WidgetTypeName;
ceguiCircuitEditor(const CEGUI::String& type, const CEGUI::String& name);
~ceguiCircuitEditor();
}
class cpp
Code: Select all
#include "ceguiCircuitEditor.hpp"
using namespace CEGUI;
const String ceguiCircuitEditor::EventNamespace("ceguiCircuitEditor");
const String ceguiCircuitEditor::WidgetTypeName("ceguiCircuitEditor");
ceguiCircuitEditor::ceguiCircuitEditor(const CEGUI::String& type, const CEGUI::String& name) : CEGUI::FrameWindow(type, name)
{
}
ceguiCircuitEditor::~ceguiCircuitEditor()
{
}
initiating the type
Code: Select all
CEGUI::WindowFactoryManager::getSingleton().addFactory<CEGUI::TplWindowFactory<ceguiCircuitEditor> >();
CEGUI::WindowFactoryManager::getSingleton().
addFalagardWindowMapping("Vanilla/ceguiCircuitEditor",
"ceguiCircuitEditor",
"Vanilla/FrameWindow",
"Falagard/FrameWindow");
ceguiCircuitEditor *ceguiCircuitEditor_ = static_cast<ceguiCircuitEditor*>(wmgr.createWindow("Vanilla/ceguiCircuitEditor", "ceguiEditorWindow"));
This compiles fine, but I get a runtime error:
CEGUI::UnknownObjectException in function 'CEGUI::NamedElement* CEGUI::NamedElement::getChildElement(const CEGUI::String&) const' (/home/osbios/dev/cegui-0.8.2/cegui/src/NamedElement.cpp:151) : The Element object referenced by '__auto_titlebar__' is not attached to Element at 'ceguiEditorWindow'.
What do I miss? I followed this Tutorial: http://www.cegui.org.uk/wiki/index.php/ ... right_time but its outdated and for example I don't know what the function testClassName_impl is equivalent to in the 8.2 version.
My followup question would be: how to implement custom drawing? As I understand it, cegui uses an internal drawing batch where I could put "simple" drawing commands into. Is it also possible to have a custom call inbetwin this batches. So that I could call into my own function, give it some screen coodinates and use OpenGL to draw directly to that screen space? Or do I have to render to texture and then insert a texture square into the cegui batcher?