mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
GLContext: Remove global context pointer
This commit is contained in:
@ -6,24 +6,23 @@
|
||||
|
||||
#include "Common/CommonFuncs.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/GL/GLContext.h"
|
||||
#include "Common/GL/GLUtil.h"
|
||||
#include "Common/GL/GLExtensions/GLExtensions.h"
|
||||
|
||||
#include "VideoBackends/OGL/PerfQuery.h"
|
||||
#include "VideoCommon/RenderBase.h"
|
||||
#include "VideoBackends/OGL/Render.h"
|
||||
#include "VideoCommon/VideoConfig.h"
|
||||
|
||||
namespace OGL
|
||||
{
|
||||
std::unique_ptr<PerfQueryBase> GetPerfQuery()
|
||||
{
|
||||
if (g_main_gl_context->IsGLES() && GLExtensions::Supports("GL_NV_occlusion_query_samples"))
|
||||
const bool is_gles = static_cast<Renderer*>(g_renderer.get())->IsGLES();
|
||||
if (is_gles && GLExtensions::Supports("GL_NV_occlusion_query_samples"))
|
||||
return std::make_unique<PerfQueryGLESNV>();
|
||||
|
||||
if (g_main_gl_context->IsGLES())
|
||||
else if (is_gles)
|
||||
return std::make_unique<PerfQueryGL>(GL_ANY_SAMPLES_PASSED);
|
||||
|
||||
return std::make_unique<PerfQueryGL>(GL_SAMPLES_PASSED);
|
||||
else
|
||||
return std::make_unique<PerfQueryGL>(GL_SAMPLES_PASSED);
|
||||
}
|
||||
|
||||
PerfQuery::PerfQuery() : m_query_read_pos()
|
||||
|
Reference in New Issue
Block a user