View Full Version : half fps on faster computer
05-21-2004, 11:00 AM
I've developed a game 2d game in OpenGL. Its nearly ready for testing so I decided to install it on my desktop(I've developed it on my laptop). My laptop has a GeForce2 Go w/ 16mb, which is more than enough to make the game run at 32 fps, which is what the game is set to. My desktop has GeForce4 w/ 128 mb, however the game runs twice as slow. My desktop should have no problem running the game. When I installed it on someones elses computer it was slow again. The first thing I did on both desktops was update the video driver. It didn't help. I'm using visual studio .net and it detects that the only dependency my project has is OPENGL32.dll which is installed along with the game.
Quite frankly I don't even know where to begin to troubleshoot. So my question is where should I be looking?
05-21-2004, 11:27 AM
you shouldn't install opengl32.dll along with the game. It is part of the drivers for your video card.
05-21-2004, 11:52 AM
Originally posted by chowe6685:
you shouldn't install opengl32.dll along with the game. It is part of the drivers for your video card.I uninstalled the game then reinstalled without OPENGL32.DLL. It still moves at a crawl.
05-21-2004, 12:26 PM
Reinstall your graphics card drivers from the NVIDIA web site.
05-21-2004, 02:21 PM
Its still slow. I think it might be something about my program because it is slow on every computer I've tried it on except my laptop which I developed it on. Is it that OpenGL is using emulation for functions that it thinks the hardware doesn't support? Is there a way to find out? I don't have a clue. If you need more info about my program, just tell me what you want to know.
The difference of performance might come from vsync. Maybe your laptop has vsync disabled by default and it is enabled on the other computers ?
Try to run GLinfo in the same folder as your game executable, and see which GL vendor it reports : if it is Microsoft, you have not installed correctly you videocard drivers.
Is there any chance to see the source code and/or download the game to test ?
05-22-2004, 12:10 PM
Ok, I put the game on my webpage, which is nothing more than a generic template right now. Under favortie links there is a link named "1945 Game". This is link to a zip file which contains the windows msi installation file. You should be able to double click the msi file and it will install the executable, the source code, and the image files.
The source code is pretty big, or at least not well organized, so I'll point out the functions that have OpenGL functions: Initialize, Render, DrawBitmap, SetupPixelFormat.
BTW, someone on another forum said that glDrawPixels, which I use, is much slower than using textures. Could this game be slower on different computers because I use glDrawPixels? Also, vsync is enabled by default on my laptop. I'll check the others computers though.
Indeed, glDrawPixels should be avoided ! It is often very slow. Data has to be transferred from cpu memory to video memory, then processed by the card (and they are not really optimized for this).
To improve data transfert as your sprites are not changed after loading, maybe put each drawpixels command in a display list.
Why do you use both of these commands to place your bitmaps :
glBitmap (0, 0, 0, 0, x, y, NULL);
Only rasterpos with proper coords should be enough.
And as already said, textured quads are much faster than draw pixels. At least try to draw the background as textured quads.
PS: I tested your game and it is awfully slow on a TNT2. Quake3 is much faster :p
05-22-2004, 11:58 PM
I guess I'll have to change my game to use textures then. It seems to be the best solution since DrawPixels is to be avoided. It's still a mystery why it runs smoothly on my laptop. If I don't control the game's frame-rate it reaches 75+. It must be using video memory somehow; I don't know. Though I guess it doesn't matter.
I use both of these commands,
glBitmap (0, 0, 0, 0, x, y, NULL);
so I can draw offscreen. You set the raster to a valid position then move it using glBitmap. Thanks for the help.
05-24-2004, 11:52 AM
As a super wild guess, maybe your laptop does *completely software* rendering of drawpixels, that might be faster than synchronisations issues with hardware accelerated stuff ?
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.