mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
[GLExtensions] Initial code drop for GLExtensions. This drops GLEW entirely from the codebase. This has been tested on Android and Linux+ATI. Of course untested on Windows and Apple. Also untested with Linux + EGL but should be fine there. There are most likely a couple of extensions I'm missing which would result in null pointer runs but not bad for the initial commit.
Conflicts: CMakeLists.txt Externals/GLew/glew.vcxproj Externals/GLew/glew.vcxproj.filters Source/Core/VideoBackends/OGL/CMakeLists.txt Source/Core/VideoBackends/OGL/GLFunctions.cpp Source/Core/VideoBackends/OGL/GLFunctions.h Source/Core/VideoBackends/OGL/GLUtil.h Source/Core/VideoBackends/OGL/Render.cpp Source/VSProps/Base.props
This commit is contained in:
@ -1,3 +1,8 @@
|
||||
// Copyright 2013 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "GLInterface.h"
|
||||
#include "RenderBase.h"
|
||||
#include "GLUtil.h"
|
||||
#include "PerfQuery.h"
|
||||
@ -41,7 +46,7 @@ void PerfQuery::EnableQuery(PerfQueryGroup type)
|
||||
{
|
||||
auto& entry = m_query_buffer[(m_query_read_pos + m_query_count) % ArraySize(m_query_buffer)];
|
||||
|
||||
glBeginQuery(GL_SAMPLES_PASSED, entry.query_id);
|
||||
glBeginQuery(GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGL ? GL_SAMPLES_PASSED : GL_ANY_SAMPLES_PASSED, entry.query_id);
|
||||
entry.query_type = type;
|
||||
|
||||
++m_query_count;
|
||||
@ -56,7 +61,7 @@ void PerfQuery::DisableQuery(PerfQueryGroup type)
|
||||
// stop query
|
||||
if (type == PQG_ZCOMP_ZCOMPLOC || type == PQG_ZCOMP)
|
||||
{
|
||||
glEndQuery(GL_SAMPLES_PASSED);
|
||||
glEndQuery(GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGL ? GL_SAMPLES_PASSED : GL_ANY_SAMPLES_PASSED);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user