mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-02-22 11:21:21 +00:00
[client] ds: add optional method signalNextFrame(LGEvent)
This method takes an LGEvent and signals it when the next frame should be rendered in time for the next vblank. We will be using this to render imgui at screen refresh rate, but this could potentially be used later to implement a better form of vsync for supported display servers. This must be invoked before swapping buffers.
This commit is contained in:
parent
be9a16e8a2
commit
3043296e52
1 changed files with 8 additions and 0 deletions
|
@ -101,6 +101,8 @@ typedef void (* LG_ClipboardReplyFn)(void * opaque, const LG_ClipboardData type,
|
|||
typedef struct LG_DSGLContext
|
||||
* LG_DSGLContext;
|
||||
|
||||
typedef struct LGEvent LGEvent;
|
||||
|
||||
struct LG_DisplayServerOps
|
||||
{
|
||||
/* called before options are parsed, useful for registering options */
|
||||
|
@ -147,6 +149,12 @@ struct LG_DisplayServerOps
|
|||
void (*glSwapBuffers)(void);
|
||||
#endif
|
||||
|
||||
/* Signals event when the next frame should be rendered in time for the next vblank.
|
||||
* This must be invoked on the render thread before swapping buffers.
|
||||
* If used, the render thread MUST wait for event before rendering the next frame.
|
||||
* This is optional and a display server may choose to not implement it. */
|
||||
void (*signalNextFrame)(LGEvent * event);
|
||||
|
||||
/* dm specific cursor implementations */
|
||||
void (*guestPointerUpdated)(double x, double y, double localX, double localY);
|
||||
void (*setPointer)(LG_DSPointer pointer);
|
||||
|
|
Loading…
Add table
Reference in a new issue