mirror of
https://github.com/JulianGro/overte.git
synced 2025-05-02 10:30:40 +02:00
Fix linkage
This commit is contained in:
parent
ab7aa52a10
commit
51a0131414
4 changed files with 12 additions and 7 deletions
|
@ -14,8 +14,11 @@ macro(TARGET_OPENGL)
|
||||||
target_link_libraries(${TARGET_NAME} ${OpenGLES3} ${EGL})
|
target_link_libraries(${TARGET_NAME} ${OpenGLES3} ${EGL})
|
||||||
else()
|
else()
|
||||||
set(GLAD_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/interface/external/glad/include")
|
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})
|
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()
|
endif()
|
||||||
else()
|
else()
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
|
|
@ -34,8 +34,8 @@
|
||||||
|
|
||||||
#if defined(Q_OS_ANDROID)
|
#if defined(Q_OS_ANDROID)
|
||||||
|
|
||||||
#include <GLES3/gl32.h>
|
|
||||||
#include <EGL/egl.h>
|
#include <EGL/egl.h>
|
||||||
|
#include <GLES3/gl32.h>
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include <shared/GlobalAppProperties.h>
|
#include <shared/GlobalAppProperties.h>
|
||||||
#include <GLMHelpers.h>
|
#include <GLMHelpers.h>
|
||||||
#include "GLLogging.h"
|
#include "GLLogging.h"
|
||||||
|
#include "Config.h"
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
|
|
||||||
|
@ -130,11 +131,6 @@ void Context::setWindow(QWindow* window) {
|
||||||
updateSwapchainMemoryCounter();
|
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) {
|
void debugMessageCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam) {
|
||||||
if (GL_DEBUG_SEVERITY_NOTIFICATION == severity) {
|
if (GL_DEBUG_SEVERITY_NOTIFICATION == severity) {
|
||||||
|
|
|
@ -25,6 +25,7 @@ static bool timeElapsed = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void GLBackend::do_beginQuery(const Batch& batch, size_t paramOffset) {
|
void GLBackend::do_beginQuery(const Batch& batch, size_t paramOffset) {
|
||||||
|
#if !defined(USE_GLES)
|
||||||
auto query = batch._queries.get(batch._params[paramOffset]._uint);
|
auto query = batch._queries.get(batch._params[paramOffset]._uint);
|
||||||
GLQuery* glquery = syncGPUObject(*query);
|
GLQuery* glquery = syncGPUObject(*query);
|
||||||
if (glquery) {
|
if (glquery) {
|
||||||
|
@ -40,9 +41,11 @@ void GLBackend::do_beginQuery(const Batch& batch, size_t paramOffset) {
|
||||||
glquery->_rangeQueryDepth = _queryStage._rangeQueryDepth;
|
glquery->_rangeQueryDepth = _queryStage._rangeQueryDepth;
|
||||||
(void)CHECK_GL_ERROR();
|
(void)CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLBackend::do_endQuery(const Batch& batch, size_t paramOffset) {
|
void GLBackend::do_endQuery(const Batch& batch, size_t paramOffset) {
|
||||||
|
#if !defined(USE_GLES)
|
||||||
auto query = batch._queries.get(batch._params[paramOffset]._uint);
|
auto query = batch._queries.get(batch._params[paramOffset]._uint);
|
||||||
GLQuery* glquery = syncGPUObject(*query);
|
GLQuery* glquery = syncGPUObject(*query);
|
||||||
if (glquery) {
|
if (glquery) {
|
||||||
|
@ -65,9 +68,11 @@ void GLBackend::do_endQuery(const Batch& batch, size_t paramOffset) {
|
||||||
|
|
||||||
(void)CHECK_GL_ERROR();
|
(void)CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLBackend::do_getQuery(const Batch& batch, size_t paramOffset) {
|
void GLBackend::do_getQuery(const Batch& batch, size_t paramOffset) {
|
||||||
|
#if !defined(USE_GLES)
|
||||||
auto query = batch._queries.get(batch._params[paramOffset]._uint);
|
auto query = batch._queries.get(batch._params[paramOffset]._uint);
|
||||||
if (glGetQueryObjectui64vEXT == NULL)
|
if (glGetQueryObjectui64vEXT == NULL)
|
||||||
return;
|
return;
|
||||||
|
@ -87,6 +92,7 @@ void GLBackend::do_getQuery(const Batch& batch, size_t paramOffset) {
|
||||||
}
|
}
|
||||||
(void)CHECK_GL_ERROR();
|
(void)CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLBackend::resetQueryStage() {
|
void GLBackend::resetQueryStage() {
|
||||||
|
|
Loading…
Reference in a new issue