Add input lag reduction test

--HG--
branch : opengl3
hg/feature/opengl3
kaetemi 10 years ago
parent 4fd44d89a9
commit 35d1e1e9d5

@ -690,6 +690,12 @@ bool CDriverGL3::swapBuffers()
// Check all vertex buffer to see which one are lost
updateLostBuffers();
#if NL3D_GL3_SYNC_IMMEDIATE
// Sync on the current buffer
nlassert(_SwapBufferSync[syncI]);
nglClientWaitSync(_SwapBufferSync[syncI], 0, 1000000000ULL);
#endif
// Check in flight buffers, also checks the current one
for (size_t i = 0; i < NL3D_GL3_FRAME_QUEUE_MAX; ++i)

@ -84,6 +84,7 @@ using NLMISC::CVector;
#define NL3D_GL3_BUFFER_NOT_IN_FLIGHT (std::numeric_limits<uint64>::max())
#define NL3D_GL3_FRAME_QUEUE_MAX (2) // Maximum is three frames processing (2 frames backlog + current frame)
#define NL3D_GL3_BUFFER_QUEUE_MAX (NL3D_GL3_FRAME_QUEUE_MAX + 1) // Additional buffer for current working
#define NL3D_GL3_SYNC_IMMEDIATE 0 // Don't allow frame processing backlog if set to 1. Reduce input lag. Testing only
namespace NL3D {
namespace NLDRIVERGL3 {

Loading…
Cancel
Save