mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 13:37:22 +00:00
[client] interface: rename LG_Renderer to LG_RendererOps
Part of the standardisation of using the `Ops` suffix for all interfaces
This commit is contained in:
parent
1a8267d55a
commit
45d1f27fb4
@ -94,7 +94,7 @@ typedef enum LG_RendererCursor
|
||||
}
|
||||
LG_RendererCursor;
|
||||
|
||||
typedef struct LG_Renderer
|
||||
typedef struct LG_RendererOps
|
||||
{
|
||||
/* returns the friendly name of the renderer */
|
||||
const char * (*get_name)(void);
|
||||
@ -163,4 +163,4 @@ typedef struct LG_Renderer
|
||||
bool (*render)(void * opaque, LG_RendererRotate rotate, const bool newFrame,
|
||||
const bool invalidateWindow, void (*preSwap)(void * udata), void * udata);
|
||||
}
|
||||
LG_Renderer;
|
||||
LG_RendererOps;
|
||||
|
@ -5,7 +5,7 @@ set(RENDERER_H "${CMAKE_BINARY_DIR}/include/dynamic/renderers.h")
|
||||
set(RENDERER_C "${CMAKE_BINARY_DIR}/src/renderers.c")
|
||||
|
||||
file(WRITE ${RENDERER_H} "#include \"interface/renderer.h\"\n\n")
|
||||
file(APPEND ${RENDERER_H} "extern LG_Renderer * LG_Renderers[];\n\n")
|
||||
file(APPEND ${RENDERER_H} "extern LG_RendererOps * LG_Renderers[];\n\n")
|
||||
|
||||
file(WRITE ${RENDERER_C} "#include \"interface/renderer.h\"\n\n")
|
||||
file(APPEND ${RENDERER_C} "#include <stddef.h>\n\n")
|
||||
@ -33,10 +33,10 @@ list(LENGTH RENDERERS RENDERER_COUNT)
|
||||
file(APPEND ${RENDERER_H} "#define LG_RENDERER_COUNT ${RENDERER_COUNT}\n")
|
||||
|
||||
foreach(renderer ${RENDERERS})
|
||||
file(APPEND ${RENDERER_C} "extern LG_Renderer LGR_${renderer};\n")
|
||||
file(APPEND ${RENDERER_C} "extern LG_RendererOps LGR_${renderer};\n")
|
||||
endforeach()
|
||||
|
||||
file(APPEND ${RENDERER_C} "\nconst LG_Renderer * LG_Renderers[] =\n{\n")
|
||||
file(APPEND ${RENDERER_C} "\nconst LG_RendererOps * LG_Renderers[] =\n{\n")
|
||||
foreach(renderer ${RENDERERS})
|
||||
file(APPEND ${RENDERER_C} " &LGR_${renderer},\n")
|
||||
endforeach()
|
||||
|
@ -1064,7 +1064,7 @@ static bool egl_render(void * opaque, LG_RendererRotate rotate, const bool newFr
|
||||
return true;
|
||||
}
|
||||
|
||||
struct LG_Renderer LGR_EGL =
|
||||
struct LG_RendererOps LGR_EGL =
|
||||
{
|
||||
.get_name = egl_get_name,
|
||||
.setup = egl_setup,
|
||||
|
@ -610,7 +610,7 @@ static void render_wait(struct Inst * this)
|
||||
glDisable(GL_BLEND);
|
||||
}
|
||||
|
||||
const LG_Renderer LGR_OpenGL =
|
||||
const LG_RendererOps LGR_OpenGL =
|
||||
{
|
||||
.get_name = opengl_get_name,
|
||||
.setup = opengl_setup,
|
||||
|
@ -777,7 +777,7 @@ void intHandler(int sig)
|
||||
static bool tryRenderer(const int index, const LG_RendererParams lgrParams,
|
||||
bool * needsOpenGL)
|
||||
{
|
||||
const LG_Renderer *r = LG_Renderers[index];
|
||||
const LG_RendererOps *r = LG_Renderers[index];
|
||||
|
||||
if (!IS_LG_RENDERER_VALID(r))
|
||||
{
|
||||
|
@ -89,7 +89,7 @@ struct AppState
|
||||
bool posInfoValid;
|
||||
bool alignToGuest;
|
||||
|
||||
const LG_Renderer * lgr;
|
||||
const LG_RendererOps * lgr;
|
||||
void * lgrData;
|
||||
atomic_int lgrResize;
|
||||
LG_Lock lgrLock;
|
||||
|
Loading…
Reference in New Issue
Block a user