Page 1 of 1

Assertion given when creating System under Direct3D 9

Posted: Sun Feb 13, 2011 22:42
by bottleneck
Hey! This is my first post on the official CEGUI forums! :)
To start of I would like to say I already have used CEGUI with Ogre3D but now I'm trying to compile it in Direct3D 9.

The following code gives a assertion (both the variables are defined in the .cpp file):

Code: Select all

      myRenderer = &CEGUI::Direct3D9Renderer::bootstrapSystem( d3ddevice );
      mySystem = &CEGUI::System::create(*myRenderer);


Assertion info:
Program: ...
File: c:\Cegui-0.7.5\cegui\include\ceguisingleton.h
Line: 73
Expression: !ms_Singleton

Any idea what the problem could be?

Re: Assertion given when creating System under Direct3D 9

Posted: Sun Feb 13, 2011 22:44
by Kulik
You are practically creating CEGUI::System twice.

Code: Select all

Direct3D9Renderer::booststrapSystem

already does all the work for you, please review the docs. http://www.cegui.org.uk/docs/current/re ... orial.html

Re: Assertion given when creating System under Direct3D 9

Posted: Sun Feb 13, 2011 22:47
by bottleneck
Yeah figured it out one minute after I posted it...

Thanks for the help. I have it working now.