Sign in to follow this  

Rendering is too fast

This topic is 4422 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm currently on lesson 13 and I see that on Fullscreen mode all rotation, moving around screen, zooming is too fast (its little slower on windowed maximized mode). This may be depends of the Video Card (My works very good). I need to add something to pause code in DrawGLScene() before return. How to pause the code before repeat GL scene in the next sequence of the GL animation? P.S. Sorry for my bad English.

Share this post


Link to post
Share on other sites
It's not an elegant solution, but you can add a Sleep statement (on Windows) to have a forced delay.

Sleep(10);

That ought to be good enough. If you want slower, use 20 instead of 10.

You will need to use better methods in a production game, but for the demos and learning that should work just fine.

frob.

Share this post


Link to post
Share on other sites
I don't know how your code works, but I suppose that you could simply reduce your rotation steps (i.e instead than 1/10 deg you could use 1/100).

In the future, you may want to use a FPS indipendent method (like using a timer or something similar)

Share this post


Link to post
Share on other sites
And one more question - how I can change refresh rate. By default I use 1024x768x32 and 85 Hz but in OpenGL is autoset to 60 Hz. And is the refresh rate make rendering faster/slower (parasite) or not ?

Share this post


Link to post
Share on other sites
I'm not sure if you can change the refresh freq. from OGL, but I think that it wouldn't influence the rendering speed, as long as you have the vertical retrace sync off. You can change the freq throught SDL or Allegro (IIRC), so if you use one of them to setup your window, you should be ok.

Share this post


Link to post
Share on other sites
There isn't any way to do it through opengl by itself, because opengl does not handle implementation-specific details like that and prefers to work abstracted from the implementation. Suppose you were rendering frames for a CG-graphics movie? What would a function like glRefreshRate(...) do in that case?

Instead you have to do it through your OS-specific calls, which you already do to change the resolution and bitdepth. You would use ChangeDisplaySettings in windows (unless you are using glut)

Share this post


Link to post
Share on other sites

This topic is 4422 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this