Page 1 of 1

OpenInventor and CEGUI

Posted: Mon Oct 10, 2005 07:52
by kajoka
Hello,

I want to use CEGUI with OpenInventor.
But my first tries were not the best.
Can anybody tell me, what I have to do to integrate CEGUI in the Inventor-Scenegraph?
Here is the examplecode where I have to integrate CEGUI.
Thanks a lot in advance.
Kai


#include "stdafx.h"

#include <Inventor/Win/SoWin.h>
#include <Inventor/Win/viewers/SoWinExaminerViewer.h>

#include <Inventor/nodes/SoSelection.h>

int _tmain(int argc, _TCHAR* argv[])
{
HWND window = SoWin::init(argv[0]);

SoWinExaminerViewer *examinerViewer = new SoWinExaminerViewer(window);

// root wird erzeugt
SoSelection *root = new SoSelection();
root->setName("root");
root->ref();

examinerViewer->setSceneGraph(root);
examinerViewer->setViewing(FALSE);
examinerViewer->setFeedbackVisibility(TRUE);
examinerViewer->setFullScreen(FALSE);
examinerViewer->setDecoration(TRUE);
examinerViewer->show();
SoWin::show(window);

SoWin::mainLoop();

delete examinerViewer;

return 0;
}