mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-07-31 11:33:38 +00:00
[client] main: don't include the swap into the render timings
If vsync is enabled the swap will block until vblank skewing the timing metrics.
This commit is contained in:
parent
0ec66ba210
commit
162b1b93db
4 changed files with 13 additions and 5 deletions
|
@ -463,7 +463,7 @@ static bool opengl_needs_render(void * opaque)
|
|||
}
|
||||
|
||||
bool opengl_render(void * opaque, LG_RendererRotate rotate, const bool newFrame,
|
||||
const bool invalidateWindow)
|
||||
const bool invalidateWindow, void (*preSwap)(void * udata), void * udata)
|
||||
{
|
||||
struct Inst * this = (struct Inst *)opaque;
|
||||
if (!this)
|
||||
|
@ -503,6 +503,7 @@ bool opengl_render(void * opaque, LG_RendererRotate rotate, const bool newFrame,
|
|||
ImGui_ImplOpenGL2_RenderDrawData(igGetDrawData());
|
||||
}
|
||||
|
||||
preSwap(udata);
|
||||
if (this->opt.preventBuffer)
|
||||
{
|
||||
app_glSwapBuffers();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue