Implementations for pure virtual methods from base class (needed for threaded texture decode. Or at least to make things compile first).

master
Nicky 2022-07-28 12:06:55 +02:00
parent 5bb868ab3d
commit 99b924a7fc
4 changed files with 59 additions and 2 deletions

View File

@ -3024,4 +3024,28 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
return rtns;
}
#pragma GCC error "Unimplemented. Either disable threaded texture decoding, implent those methods or switch to SDL2."
void* LLWindowSDL::createSharedContext()
{
LL_WARNS() << "Not available" << LL_ENDL;
return nullptr;
}
void LLWindowSDL::makeContextCurrent(void* contextPtr)
{
LL_WARNS() << "Not available" << LL_ENDL;
LL_PROFILER_GPU_CONTEXT;
}
void LLWindowSDL::destroySharedContext(void* contextPtr)
{
LL_WARNS() << "Not available" << LL_ENDL;
}
void LLWindowSDL::toggleVSync(bool enable_vsync)
{
LL_WARNS() << "Not available" << LL_ENDL;
}
#endif // LL_SDL

View File

@ -151,7 +151,11 @@ public:
static Window get_SDL_XWindowID(void);
static Display* get_SDL_Display(void);
#endif // LL_X11
void* createSharedContext() override;
void makeContextCurrent(void* context) override;
void destroySharedContext(void* context) override;
void toggleVSync(bool enable_vsync) override;
protected:
LLWindowSDL(LLWindowCallbacks* callbacks,
const std::string& title, int x, int y, int width, int height, U32 flags,

View File

@ -78,7 +78,10 @@ static bool ATIbug = false;
// be only one object of this class at any time. Currently this is true.
static LLWindowSDL *gWindowImplementation = NULL;
// extern "C" Bool XineramaIsActive (Display *dpy)
// {
// return 0;
// }
void maybe_lock_display(void)
{
if (gWindowImplementation && gWindowImplementation->Lock_Display) {
@ -2560,4 +2563,25 @@ std::vector<std::string> LLWindowSDL::getDynamicFallbackFontList()
return rtns;
}
void* LLWindowSDL::createSharedContext()
{
return SDL_GL_CreateContext(mWindow);
}
void LLWindowSDL::makeContextCurrent(void* contextPtr)
{
LL_PROFILER_GPU_CONTEXT;
SDL_GL_MakeCurrent( mWindow, contextPtr );
}
void LLWindowSDL::destroySharedContext(void* contextPtr)
{
SDL_GL_DeleteContext( contextPtr );
}
void LLWindowSDL::toggleVSync(bool enable_vsync)
{
}
#endif // LL_SDL

View File

@ -148,6 +148,11 @@ public:
static Display* get_SDL_Display(void);
#endif // LL_X11
void* createSharedContext() override;
void makeContextCurrent(void* context) override;
void destroySharedContext(void* context) override;
void toggleVSync(bool enable_vsync) override;
protected:
LLWindowSDL(LLWindowCallbacks* callbacks,
const std::string& title, int x, int y, int width, int height, U32 flags,