Driver getScreenSize(), getFPS(), and getName() failing

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Driver getScreenSize(), getFPS(), and getName() failing

Post by LunaRebirth »

Most recent version crashes with an access violation when doing driver->getScreenSize().
driver->getFPS() returns garbage values (insanely high numbers).
driver->getName() returns "???" when using OpenGL.
CuteAlien
Admin
Posts: 9647
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Driver getScreenSize(), getFPS(), and getName() failing

Post by CuteAlien »

Sounds like you got a broken driver pointer. Maybe some conflict between library you link with and new headers or something like that?
Otherwise please tell me which version and platform this happens for you. I did a quick check with trunk and ogl-es versions but couldn't reproduce it.
Example 02 calls getFPS btw, so you can use that for testing.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Re: Driver getScreenSize(), getFPS(), and getName() failing

Post by LunaRebirth »

I'm bringing another developer onto my project, so we're trying to build Irrlicht on his PC.
Both of using Windows, both trying to build Irrlicht statically for x64.

I can use Irrlicht 1.8.4 and statically build, and it works great.
He can build Irrlicht 1.8.4, but then we get weird issues on his where IGUIStaticText getTextWidth() for example returns garbage values (extremely large or negative values).
I watched his screen and we built it together, so I know we are building it the same way.

So I tried building Irrlicht r6214 statically, the same way, and I get that weird broken driver pointer.
But he can build Irrlicht r6214 statically, and it'll mostly work for him except now IGUIStaticText getTextWidth() always returns 18 instead of the real values.
Since my project relies a lot on getTextWidth() for menu items, we aren't able to get him a build that looks like mine since our Irrlicht builds are wildly different.

As I said, I'm watching him build his projects so I know we're doing it the same way.

Not sure what's going on, thoughts?

Edit: We're both using OpenGL 4.6.0, both using a recent version of Visual Studio. Can't figure out what's different about our systems that's causing these differences.
CuteAlien
Admin
Posts: 9647
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Driver getScreenSize(), getFPS(), and getName() failing

Post by CuteAlien »

Maybe he should start by runing the examples to just see if Irrlicht works correct.

It sounds a bit like the problems you run into when you mix up different versions (like header include path to one version and library which got build for another version).

getTextWidth depends mostly on getDimension function from your font. Any special font you are using like ttf? In that case maybe debug trhough that function once on target system so see what's going on.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply