Qt: Fix compilation with OpenGL ES 2

This commit is contained in:
Cameron Cawley 2018-01-29 17:24:39 +00:00 committed by Vicki Pfau
parent fd60a1caff
commit 44b106528c
6 changed files with 9 additions and 9 deletions

View File

@ -5,7 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "DisplayGL.h" #include "DisplayGL.h"
#if defined(BUILD_GL) || defined(BUILD_GLES) #if defined(BUILD_GL) || defined(BUILD_GLES2)
#include <QApplication> #include <QApplication>
#include <QResizeEvent> #include <QResizeEvent>

View File

@ -6,7 +6,7 @@
#ifndef QGBA_DISPLAY_GL #ifndef QGBA_DISPLAY_GL
#define QGBA_DISPLAY_GL #define QGBA_DISPLAY_GL
#if defined(BUILD_GL) || defined(BUILD_GLES) #if defined(BUILD_GL) || defined(BUILD_GLES2)
#include "Display.h" #include "Display.h"

View File

@ -187,7 +187,7 @@ SettingsView::SettingsView(ConfigController* controller, InputController* inputC
} }
SettingsView::~SettingsView() { SettingsView::~SettingsView() {
#if defined(BUILD_GL) || defined(BUILD_GLES) #if defined(BUILD_GL) || defined(BUILD_GLES2)
if (m_shader) { if (m_shader) {
m_ui.stackedWidget->removeWidget(m_shader); m_ui.stackedWidget->removeWidget(m_shader);
m_shader->setParent(nullptr); m_shader->setParent(nullptr);
@ -196,7 +196,7 @@ SettingsView::~SettingsView() {
} }
void SettingsView::setShaderSelector(ShaderSelector* shaderSelector) { void SettingsView::setShaderSelector(ShaderSelector* shaderSelector) {
#if defined(BUILD_GL) || defined(BUILD_GLES) #if defined(BUILD_GL) || defined(BUILD_GLES2)
m_shader = shaderSelector; m_shader = shaderSelector;
m_ui.stackedWidget->addWidget(m_shader); m_ui.stackedWidget->addWidget(m_shader);
m_ui.tabs->addItem(tr("Shaders")); m_ui.tabs->addItem(tr("Shaders"));

View File

@ -21,7 +21,7 @@
#include <mgba-util/vfs.h> #include <mgba-util/vfs.h>
#include "platform/video-backend.h" #include "platform/video-backend.h"
#if defined(BUILD_GL) || defined(BUILD_GLES) #if defined(BUILD_GL) || defined(BUILD_GLES2)
#if !defined(_WIN32) || defined(USE_EPOXY) #if !defined(_WIN32) || defined(USE_EPOXY)
#include "platform/opengl/gles2.h" #include "platform/opengl/gles2.h"

View File

@ -6,7 +6,7 @@
#ifndef QGBA_SHADER_SELECTOR_H #ifndef QGBA_SHADER_SELECTOR_H
#define QGBA_SHADER_SELECTOR_H #define QGBA_SHADER_SELECTOR_H
#if defined(BUILD_GL) || defined(BUILD_GLES) #if defined(BUILD_GL) || defined(BUILD_GLES2)
#include <QDialog> #include <QDialog>

View File

@ -78,7 +78,7 @@ Window::Window(ConfigController* config, int playerId, QWidget* parent)
updateTitle(); updateTitle();
m_display = Display::create(this); m_display = Display::create(this);
#if defined(BUILD_GL) || defined(BUILD_GLES) #if defined(BUILD_GL) || defined(BUILD_GLES2)
m_shaderView = new ShaderSelector(m_display, m_config); m_shaderView = new ShaderSelector(m_display, m_config);
#endif #endif
@ -276,7 +276,7 @@ void Window::loadConfig() {
enterFullScreen(); enterFullScreen();
} }
#if defined(BUILD_GL) || defined(BUILD_GLES) #if defined(BUILD_GL) || defined(BUILD_GLES2)
if (opts->shader) { if (opts->shader) {
struct VDir* shader = VDirOpen(opts->shader); struct VDir* shader = VDirOpen(opts->shader);
if (shader) { if (shader) {
@ -463,7 +463,7 @@ void Window::exportSharkport() {
void Window::openSettingsWindow() { void Window::openSettingsWindow() {
SettingsView* settingsWindow = new SettingsView(m_config, &m_inputController, m_shortcutController); SettingsView* settingsWindow = new SettingsView(m_config, &m_inputController, m_shortcutController);
#if defined(BUILD_GL) || defined(BUILD_GLES) #if defined(BUILD_GL) || defined(BUILD_GLES2)
if (m_display->supportsShaders()) { if (m_display->supportsShaders()) {
settingsWindow->setShaderSelector(m_shaderView); settingsWindow->setShaderSelector(m_shaderView);
} }