Advertisement

Somekind of input problem

Started by January 26, 2005 10:52 AM
-1 comments, last by Advancer 19 years, 7 months ago
Hi! I'm a beginner with OpenGL, so I was tasting your tutorials. They're great, but I came across a serious problem. I don't know, what is it, but I suppose, it is within the input method. I'm using the one yours, with keys[256]. The problem itself is a lag of some strange kind. When I press button(say, to rotate a view), it first rotates for maybe a second or less and then freezes. But program then is not hanged. If I release a key(or press and release another one(!), even unused in program(!)), the view then turns in what it should be in just a moment. Like the picture was freezed, but nevertheless view was rotating anyway somewhere behind it, and when another key press-released, that vail falls off and an already rotated view emerges instantly on the screen. And continues to rotate freely. You would think that there's something with Windows messaging system(and what could it be wrong with it?), but this lag had no place(I didn't think it was it! I thought, that it was a normal pause, preventing undesireble keyrepeat in Windows! It used to be small, about a halfsecond) before I've implemented your Print function(to print starnames) and replaced all stars(the program is about an overseeing a constellation, 50 stars scattered in -50,50 box. Previous stars were vertices) with auxSolidSphere's. This means that nothing was changed except what a render function must do. Those manipulations would have only increase render function's running time. But instead, they've increased this lag. The main strangeness is that approximately a second after you've pressed a rotation key, view rotates properly. Then it freezes and stands still before key released(or another one press-released). Then continues to rotate in a normal manner(if it was another key press-releasing) or stays in this position, rotated(when no key pressed) I have no idea what could it be. It cannot be a lack of hardware, since I'm having Celeron-366, 192MBRAM, nVidia GeForce 2 32MB MX400. I know this is not the last word in high-tec hardware, but more complex OpenGL games/programs run correctly. auxKeyFunc works perfectly(a nightmare - to interface all the key control through them). And... is my computer unable to draw 50 spheres with 50 names on their places? So then I'm in a deadend, having no idea about even what could it be. Maybe it is not OpenGL problem, but I followed your tutorials in everything, so, there's something within them and me(another guy, following it met no problems!). PLEASE HELP!!! That's critical lag to goodlooking of a program almost of any kind!

This topic is closed to new replies.

Advertisement