GLFW much slower than XNA
Monkey Targets Forums/Desktop/GLFW much slower than XNA
| ||
Hi, is there any particular reason why a GLFW build would run considerably slower than an XNA build? GLFW is 0.5fps and XNA makes the 60fps. Ta |
| ||
Post it and see if other people get the same fps? |
| ||
I'll have to see if I can reproduce the slow performance in another app and then I'll post the source here :) Even on the intro screen for what I am making it performs badly for me |
| ||
GLFW runs great for me... so it may be a software issue on your computer with OpenGL. |
| ||
I am assuming it's a bit of both, as I have an onboard intel graphics card. |
| ||
ok, onboard gfc, most likely that is the reason why you get a slow performance under OpenGL. On XNA it uses DirectX and that runs better with these chips. Try GLDirect: http://sourceforge.net/projects/gldirect/ Should give you at least a decent performance for OpenGL on such a system. |
| ||
Cheers Mike, though I am not yet entirely sure how I go about using it! (checking the site as we speak) Edit: Ok so it's a replacement for my systems opengl32.dll, right? I tried putting it in the same folder as MonkeyGame.exe and was told my graphics adapter doesn't support it. "Graphics adapter does not meet minimum specification for GLDirect" |
| ||
Ok, was worth a try. For me I always installed it the regular way. And I was on XP. |
| ||
Thanks for the suggestion anyway Mike. |
| ||
What's going on with the "Posted X hours/minutes ago" readings? |
| ||
raz, Around the start of each month the posting times go a bit haywire - does the same at blitzbasic.com. |
| ||
Got ya, thanks Matt |
| ||
This happens for me too on my higher end dev system (NVidia GTX 560M 2GB). However, on my lower end system it runs great - like 60 FPS great. Heck, even running it on a VM actually runs faster. And for some odd reason, if i were to play around with the window size (like resizing it during run time) it may cause to speed up again. Weird...think it may have something to do with the graphics card. |
| ||
Hi, Have you guys tried updating graphics drivers? Sounds like GL is running software. |
| ||
Have you guys tried updating graphics drivers? Sounds like GL is running software. Yep, mine's updated to the latest nvidia drivers and still does this. Its a bit sporadic too how it just randomly occurs. Sometimes it does actually run at 60 FPS, other times it crawls. |
| ||
On my system, GLFW will go butt-slow when running my game in debug mode. Slower still when object caching is being employed. This all goes away when compiling in Release mode. Do the problems everyone else is having persist when compiled in Release mode? |
| ||
Do the problems everyone else is having persist when compiled in Release mode? Yep, this still happens for me, but sporadic. Strangely though, if i were to run it on a VM it actually runs at full speed. Weird. |
| ||
GLFW runs extremely slow for me in release and debug modes. It didn't used to be like that. Something went screwy. UPDATE: Disregard, it was my fault. I had a Print statement in there and that's what was bogging it down. Took it out and now it flies. |
| ||
Ugh...still sporadic for me, and still not sure whats causing it. In the meantime, VM is still my friend. |
| ||
Not given it a go since I mentioned it a year ago, but I will do when I get home! I'll post my specs too |
| ||
Windows 7 64bit ATI Radeon 7750 HD 800MHz 1GB PCI-Express 3.0 Intel Pentium Dual Core Sandybridge G630 2.7GHz 8GB RAM |
| ||
I just had the same problem while I just wanted to see what has been going on on Monkey since it's release (bought it back then, but haven't done any coding using it). Luckily I had a very old version installed (31) gave it a try and it run fullspeed so I was able to locate the issue :) It's the joystick/gamepad support - in my case I do have a wireless adapter for the Xbox 360 gamepad. As long as my gamepad isn't connected the glfw target is unusable slow but if I switch on the gamepad it works without an issue. Unplugging the wireless adapter doesn't help, so the only solution is to switch on my gamepad. So my guess is, if you used a joystick/gamepad at any time in the past, for whatever reason, Monkey (or the library Monkey uses to handle the joystick input) keeps trying to access/init/connect the joystick/gamepad and this probably timeouts after a few hundret milliseconds each frame. Well, that's at least my guess but I'm quite sure that's a pretty good shot at it. Unfortunately I don't have a clue about the build backends so I have no idea how this could be fixed, but maybe someone who does, could have a look at the issue. |
| ||
Ok, this was easier than I expected (took me longer to find the bug than to find a workaround ;-)) Add these lines after mouseY=y; in gxtkInput::BeginUpdate() in the file mojo.glfw.cpp (in modules/mojo/native) if( glfwGetJoystickParam( GLFW_JOYSTICK_1, GLFW_PRESENT ) == GL_FALSE ) { return; } This is just a quick fix, I don't know if the state data of the buttons/axis should be reset to some default values if the joystick isn't present. So just use this as a workaround until it's fixed in an official release. |
| ||
Oh wow, I look forward to giving this a try :) |
| ||
--- Wow yeah, it's to do with the game pad. If the Xbox controller is plugged in, it's fine, if it isn't it's really patchy. With Michael Flad's patch it's fine either way! (Thanks Michael!) |