DisplayModeChanged isn't defined?

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
IJs
Just popping in
Just popping in
Posts: 9
Joined: Sun Mar 13, 2005 13:42
Contact:

DisplayModeChanged isn't defined?

Postby IJs » Fri Mar 25, 2005 14:20

I'm having this problem with CEGUI 0.1.0 (and 0.1.1) and it's annoying me. I can't find out what's causing it or how to solve it.

When I start the application, it immediately bombs out with the following error in the log file:

Code: Select all

---- CEGUI System initialisation completed ----
(Error)   Exception: No event named 'DisplayModeChanged' is defined for this EventSet


It seems like somehow DisplayModeChanged (Renderer::EventDisplaySizeChanged) isn't defined in the Renderer's EventSet. It should be, here's a piece from CEGUIRenderer.cpp (line 53):

Code: Select all

Renderer::Renderer(void)
    : d_resourceProvider(0)
{
   // setup standard events available
   addEvent(EventDisplaySizeChanged);

   // default initialisation
   resetZValue();
}


It errors out after the initialisation of System (after creating the System class), when trying to subscribe the above event, CEGUISystem.cpp (line 315):

Code: Select all

// subscribe to hear about display mode changes
d_renderer->subscribeEvent(Renderer::EventDisplaySizeChanged, Event::Subscriber(&CEGUI::System::handleDisplaySizeChange, this));


Now, here's some source code from my application. I'm using a DirectX 8.1 renderer for this.

Code: Select all

using namespace CEGUI;
DirectX81Renderer *pRend = NULL;
pRend = new DirectX81Renderer( pD3DDevice, Size(g_scScreen.BackBufferWidth, g_scScreen.BackBufferHeight ) );
new System(pRend);
pRend->postD3DReset();


I've tried to solve this by putting a addEvent(Renderer::EventDisplaySizeChanged) before the creation of the System class, but that resulted in a crash.

I thought I had it fixed by putting a removeEvent(Renderer::EventDisplaySizeChanged) after the new System line (it started working again), but it stopped working after a period of time.

Anyhow.. this error only appears to be happening on my system and not on other developers systems. I'm running Windows 2003 Standard Edition with DirectX 9.0c, latest NVidia drivers. I'm using Visual C++ 6.0 and CEGUI 1.0 (1.1 wouldn't work either).

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: DisplayModeChanged isnt defined?

Postby CrazyEddie » Fri Mar 25, 2005 15:09

Nothing comes immediately to mind. I'll have a look around though I would recommend you think about upgrading from 1.0.0 - there have been large numbers of bug fixes made (for your info, I intend to release 0.2.1 at some stage over the next week :) ).

I'll get back to you if I can spot the problem.

CE.

User avatar
IJs
Just popping in
Just popping in
Posts: 9
Joined: Sun Mar 13, 2005 13:42
Contact:

Re: DisplayModeChanged isnt defined?

Postby IJs » Sat Mar 26, 2005 10:39

(...)

Changing to 0.2.0 worked, as you suggested. Thanks!


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 11 guests