[client] renderers: add new needs_render method to the interface

With jitRender the renderer needs to tell the main application if it
needs to be rendererd, such as during the initial splash screen fade
out.
This commit is contained in:
Geoffrey McRae 2021-08-01 18:18:08 +10:00
parent 2d74c93232
commit f8e1ab8f31
3 changed files with 17 additions and 0 deletions

View file

@ -456,6 +456,12 @@ bool opengl_render_startup(void * opaque)
return true;
}
static bool opengl_needs_render(void * opaque)
{
struct Inst * this = (struct Inst *)opaque;
return !this->waitDone;
}
bool opengl_render(void * opaque, LG_RendererRotate rotate, const bool newFrame,
const bool invalidateWindow)
{
@ -618,6 +624,7 @@ const LG_Renderer LGR_OpenGL =
.on_frame_format = opengl_on_frame_format,
.on_frame = opengl_on_frame,
.render_startup = opengl_render_startup,
.needs_render = opengl_needs_render,
.render = opengl_render
};