[SOLVED]Watch static global Singleton variable

Problems building or running the engine, queries about how to use features etc.
Post Reply
drwbns
Orc Shaman
Posts: 782
Joined: Mon Jan 18, 2010 6:06 pm
Location: Costa Mesa, California
x 24

[SOLVED]Watch static global Singleton variable

Post by drwbns »

Ogre Version: :1.10
Operating System: :?:
Render System: :?:

Hello. Is there a proper way define a static global variable for a Singleton class derived from ogre Singleton? I want to be able to watch the global variables for any Singleton classes in Visual Studio but it seems like I cannot use a #Define for this. Do I need to make a static Global variable inside my .h file outside of each Singleton class?
Last edited by drwbns on Sat May 01, 2021 4:09 am, edited 1 time in total.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 4665
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 999
Contact:

Re: Watch static global Singleton variable

Post by dark_sylinc »

What do you mean by 'watch'?
Cheers
drwbns
Orc Shaman
Posts: 782
Joined: Mon Jan 18, 2010 6:06 pm
Location: Costa Mesa, California
x 24

Re: Watch static global Singleton variable

Post by drwbns »

Hello Matias! I meant the watch window while debugging in VS:

Image
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 4665
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 999
Contact:

Re: Watch static global Singleton variable

Post by dark_sylinc »

You should be able to watch it via:

Ogre::Root::msSingleton
Application::msSingleton
etc...

For every Ogre singleton you wish to watch (use the full namespace)
drwbns
Orc Shaman
Posts: 782
Joined: Mon Jan 18, 2010 6:06 pm
Location: Costa Mesa, California
x 24

Re: Watch static global Singleton variable

Post by drwbns »

That was it. Thanks Matias!
Post Reply