Dear guys, I’m experiencing problems with animation and refresh rate.
The problems are:
The faster I move, less smoother is the movement. I cannot find a way to move faster in a scene without translating “the camera” more points in the system. If I do my camera to move a large amount of points (1.0 i.e.) in a time, the movement seems to be lagging. A way I found to do the movement smoother, is to make the camera move a little bit each frame (like 0.05 points in Z axis, for example), but this cause the speed of movement too slow and the camera delays a lot to reach a certain point in the space.
My question: what is the way to increase the speed of movement and at same time have a smooth movement, whether this is possible or not?
The faster I move the camera, more flickering is the lines, for example. I tried to reproduce the effect in the image below, but actually the effect is even worse.
My question: Why this occurs? Is there a way to prevent this?
I enabled V-sync in driver and the problem solved. Now I only need to enable v-sync on application, but I’m struggling to find the properly function, I’m using Microsoft Visual Studio 2008 (C++) and looks like MS headers doesn’t bring the wglSwapInterval function. I tried to prototype it from Windows API but it doesn’t work. But I will try more later.
Now I’m more worried with the 1st problem I’ve described, anyone could help me with it?
SwapInterval = getProcAddress(“glXSwapInterval”);
SwapInterval = getProcAddress(“glXSwapIntervalEXT”);
SwapInterval = getProcAddress(“glXSwapIntervalSGI”);
SwapInterval = getProcAddress(“wglSwapInterval”);
SwapInterval = getProcAddress(“wglSwapIntervalEXT”);
SwapInterval = getProcAddress(“wglSwapIntervalSGI”);
About you point 1, I though it had the same cause.
How is done your input handling ? Keyboard, mouse ?
Naive glut keyboard handling would only get you the keyboard repetition, something like 10 updates per second. The library GLFW is better suited to what you are doing by the way. Very easy and nice (plus it has vsync control built in).
Another problem comes from what you are drawing : low poly wireframe will always appear to “jump” even with 100fps. Try with filled polygons, to compare : if it is better, then a solution for wireframe would be to do some motion blur.
It can be done in different ways, depending you needs, the scene complexity, etc.
thanks Zbuffer, my input is being done via mouse and keyboard. By now, I can’t use GLFW, it’s a GLUT research. I filled the polygon and made some simple lightining, the motion flow appeared to be slightly better, but in general it persists lagging. I thought the cause is my LCD monitor, but it is very fast for games (2ms real), I don’t have this problem for any games, not even with Trackmania that is a fast motion game.
I think this is normal and it must have a way to be softened, but like you said, maybe not with glut.
Another simple question, I’m thinking that GL header that comes with Visual C++ 2008 is Opengl 1.1 compliant. Is there a way to check the version? If it is 1.1, how could I get at least 2.0 version? I want to make use at least of Shader Model 2.0, and with 1.1 that will be impossible.
My dream is to master OpenGL or Direct3D, but even doing this, it will be impossible to create a game like Crysis (lol) by working alone, unless I had 2 or 3 lifes, lol. I love 3D graphics, I spent hours studying GPU architectures but now it’s time to learn some programming skills. I’m doing my conclusion work for university so I can finally get my diploma in computing science, but I want to continue this work and try to create some cool stuff.
I want to be like you in a mean of mastering Opengl, but if I become a graphics part, I prefer to be a stream processor, lol.