mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-07 03:04:05 +00:00
[client] allow renderers to pass back if they need an OpenGL context
This commit is contained in:
@@ -162,7 +162,7 @@ void egl_setup(void)
|
||||
option_register(egl_options);
|
||||
}
|
||||
|
||||
bool egl_create(void ** opaque, const LG_RendererParams params)
|
||||
bool egl_create(void ** opaque, const LG_RendererParams params, bool * needsOpenGL)
|
||||
{
|
||||
// check if EGL is even available
|
||||
if (!eglQueryString(EGL_NO_DISPLAY, EGL_VERSION))
|
||||
@@ -198,6 +198,7 @@ bool egl_create(void ** opaque, const LG_RendererParams params)
|
||||
return false;
|
||||
}
|
||||
|
||||
*needsOpenGL = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -193,7 +193,8 @@ static void opengl_setup(void)
|
||||
option_register(opengl_options);
|
||||
}
|
||||
|
||||
bool opengl_create(void ** opaque, const LG_RendererParams params)
|
||||
bool opengl_create(void ** opaque, const LG_RendererParams params,
|
||||
bool * needsOpenGL)
|
||||
{
|
||||
// create our local storage
|
||||
*opaque = malloc(sizeof(struct Inst));
|
||||
@@ -232,21 +233,21 @@ bool opengl_create(void ** opaque, const LG_RendererParams params)
|
||||
|
||||
this->alerts = ll_new();
|
||||
|
||||
*needsOpenGL = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool opengl_initialize(void * opaque)
|
||||
{
|
||||
//FIXME
|
||||
return false;
|
||||
#if 0
|
||||
struct Inst * this = (struct Inst *)opaque;
|
||||
if (!this)
|
||||
return false;
|
||||
|
||||
this->waiting = true;
|
||||
this->waitDone = false;
|
||||
return true;
|
||||
|
||||
#if 0
|
||||
*sdlFlags = SDL_WINDOW_OPENGL;
|
||||
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER , 1);
|
||||
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
|
||||
|
Reference in New Issue
Block a user