Skip to main content
7 votes
Accepted

Handling variable frame rate in SDL2

The most consistent way to do this is to use a fixed time step for your game logic. This avoids game logic oddities due to rounding errors when frame rate changes (collisions or events that don't ...
Stephane Hockenhull's user avatar
3 votes

DOS VGA card vertical sync - how to check for blanking interval?

It's been a while since I've done it, but here's a summary Iof the method I learned from André LaMothe's Black Art of 3D Game Programming: You can write an interrupt service routine (ISR) that ...
Pikalek's user avatar
  • 12.4k
2 votes
Accepted

Gldraw call asynchronous or not

By calling glDrawArrays you queue that action in the GPU. It will get executed the next time you call glFlush which is also ...
akaltar's user avatar
  • 1,681
2 votes

Use vsync event instead of a 16ms timer?

There are various reasons not to use the vsync event nowadays. Indeed, historically when the games had to sync with the refreshrate of the screen because the ‘redraw’ would be visible or cause a ...
Felsir's user avatar
  • 4,067
2 votes
Accepted

How can I tell in code if vsync is disabled on desktop PC?

I couldn't locate anything directly in GLFW that for checking the status of vsync. According to the official OpenGL spec on swap intervals, swap interval access is provided via platform-specific ...
Pikalek's user avatar
  • 12.4k
2 votes
Accepted

The value of VSync on vSync Count in Unity

It's written in the link you provided: The number of VSyncs that should pass between each frame. So, 3 means one frame every 3 VSyncs (with VSync at 60Hz, this means 20FPS), and 4 means 15FPS. ...
Galandil's user avatar
  • 1,284
2 votes

What does VSync mean on a variable refresh rate monitor?

With regards to the DX API, your intuition is correct. Variable refresh rate (vrr) displays require tearing to be enabled, meaning Vsync is off. Conversely if Vsync is on, you no longer have a ...
Pikalek's user avatar
  • 12.4k
2 votes

How to enable V-Sync in Java?

drawImage() returns immediately - it doesn't wait until the content is drawn. Similarly, I don't see anything in the docs that says any of the other graphics code ...
Pikalek's user avatar
  • 12.4k
1 vote

Understanding buffer swapping in more detail

The problem was related to the window manager. I could see the expected behavior when I ran in full screen.
felipeek's user avatar
  • 131
1 vote

Wait for vSync without swapping buffers with SDL

You can use SDL_GL_SetSwapInterval(0). Parameters: 0 for immediate updates 1 for updates synchronized with the vertical retrace -1 for adaptive vsync
hkishn's user avatar
  • 11
1 vote
Accepted

Wait for vSync without swapping buffers with SDL

VSync is done fully by the GPU. Available only through the use of GAPI to be only used internally by driver's GAPI implementation. There is no regular way you can get access to the VSync signal ...
Ocelot's user avatar
  • 1,433
1 vote

Gldraw call asynchronous or not

When you give any draw command. The function returns its value immediately in next tick. You give "gldrawarrays" it tells gpu to draw all stuff. Cpu goes to the next command, while gpu is still ...
user3042253's user avatar
1 vote

Prevent rendering queue from overflowing when using Vsync

As far as I understand, my program will submit frames to the driver way faster than it is going to draw (because of Vsync) and this should lead to some type of periodic locking up/lagging. Not it ...
Stephane Hockenhull's user avatar
1 vote

How can I update vSync settings after creating an SDL_Renderer?

Since 2.0.18 you can use SDL_RenderSetVSync: Toggle VSync of the given renderer. Syntax int SDL_RenderSetVSync(SDL_Renderer* renderer, int vsync); ...
Paul's user avatar
  • 11
1 vote

Does DirectX implement Triple Buffering?

The behavior of the Direct3D swapchain has, traditionally, been a FIFO queue. Windows 7 addressed this problem in Direct3D 9 Ex by advancing the read target that the Desktop Window Manager uses for ...
Andon M. Coleman's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible