mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-11 05:43:04 +02:00
Merge branch 'windows_gles' of https://github.com/jherico/hifi into android-gles
This commit is contained in:
commit
9fc50628e1
4 changed files with 12 additions and 7 deletions
|
@ -14,8 +14,11 @@ macro(TARGET_OPENGL)
|
|||
target_link_libraries(${TARGET_NAME} ${OpenGLES3} ${EGL})
|
||||
else()
|
||||
set(GLAD_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/interface/external/glad/include")
|
||||
message("QQQ ${GLAD_INCLUDE_DIR}")
|
||||
target_include_directories(${TARGET_NAME} PUBLIC ${GLAD_INCLUDE_DIR})
|
||||
|
||||
find_package(OpenGL REQUIRED)
|
||||
target_link_libraries(${TARGET_NAME} "${OPENGL_LIBRARY}")
|
||||
target_include_directories(${TARGET_NAME} PUBLIC ${OPENGL_INCLUDE_DIR})
|
||||
endif()
|
||||
else()
|
||||
if (APPLE)
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
|
||||
#if defined(Q_OS_ANDROID)
|
||||
|
||||
#include <GLES3/gl32.h>
|
||||
#include <EGL/egl.h>
|
||||
#include <GLES3/gl32.h>
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <shared/GlobalAppProperties.h>
|
||||
#include <GLMHelpers.h>
|
||||
#include "GLLogging.h"
|
||||
#include "Config.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
|
||||
|
@ -130,11 +131,6 @@ void Context::setWindow(QWindow* window) {
|
|||
updateSwapchainMemoryCounter();
|
||||
}
|
||||
|
||||
static HMODULE glModule = nullptr;
|
||||
#ifndef GLAPIENTRY
|
||||
#define GLAPIENTRY APIENTRYP
|
||||
#endif
|
||||
|
||||
|
||||
void debugMessageCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam) {
|
||||
if (GL_DEBUG_SEVERITY_NOTIFICATION == severity) {
|
||||
|
|
|
@ -25,6 +25,7 @@ static bool timeElapsed = false;
|
|||
#endif
|
||||
|
||||
void GLBackend::do_beginQuery(const Batch& batch, size_t paramOffset) {
|
||||
#if !defined(USE_GLES)
|
||||
auto query = batch._queries.get(batch._params[paramOffset]._uint);
|
||||
GLQuery* glquery = syncGPUObject(*query);
|
||||
if (glquery) {
|
||||
|
@ -40,9 +41,11 @@ void GLBackend::do_beginQuery(const Batch& batch, size_t paramOffset) {
|
|||
glquery->_rangeQueryDepth = _queryStage._rangeQueryDepth;
|
||||
(void)CHECK_GL_ERROR();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void GLBackend::do_endQuery(const Batch& batch, size_t paramOffset) {
|
||||
#if !defined(USE_GLES)
|
||||
auto query = batch._queries.get(batch._params[paramOffset]._uint);
|
||||
GLQuery* glquery = syncGPUObject(*query);
|
||||
if (glquery) {
|
||||
|
@ -65,9 +68,11 @@ void GLBackend::do_endQuery(const Batch& batch, size_t paramOffset) {
|
|||
|
||||
(void)CHECK_GL_ERROR();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void GLBackend::do_getQuery(const Batch& batch, size_t paramOffset) {
|
||||
#if !defined(USE_GLES)
|
||||
auto query = batch._queries.get(batch._params[paramOffset]._uint);
|
||||
if (glGetQueryObjectui64vEXT == NULL)
|
||||
return;
|
||||
|
@ -87,6 +92,7 @@ void GLBackend::do_getQuery(const Batch& batch, size_t paramOffset) {
|
|||
}
|
||||
(void)CHECK_GL_ERROR();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void GLBackend::resetQueryStage() {
|
||||
|
|
Loading…
Reference in a new issue