Rename OpenGLInfo to OpenGLVersionChecker

This commit is contained in:
David Rowe 2016-01-29 12:14:47 +13:00
parent af3d842e60
commit b7134c75c3
3 changed files with 13 additions and 13 deletions

View file

@ -1,5 +1,5 @@
//
// OpenGLInfo.cpp
// OpenGLVersionChecker.cpp
// interface/src
//
// Created by David Rowe on 28 Jan 2016.
@ -9,19 +9,19 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "OpenGLInfo.h"
#include "OpenGLVersionChecker.h"
#include <QMessageBox>
#include <QRegularExpression>
#include "GLCanvas.h"
OpenGLInfo::OpenGLInfo(int& argc, char** argv) :
OpenGLVersionChecker::OpenGLVersionChecker(int& argc, char** argv) :
QApplication(argc, argv)
{
}
bool OpenGLInfo::isValidVersion() {
bool OpenGLVersionChecker::isValidVersion() {
bool valid = true;
// Retrieve OpenGL version

View file

@ -1,5 +1,5 @@
//
// OpenGLInfo.h
// OpenGLVersionChecker.h
// interface/src
//
// Created by David Rowe on 28 Jan 2016.
@ -9,17 +9,17 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef hifi_OpenGLInfo_h
#define hifi_OpenGLInfo_h
#ifndef hifi_OpenGLVersionChecker_h
#define hifi_OpenGLVersionChecker_h
#include <QApplication>
class OpenGLInfo : public QApplication {
class OpenGLVersionChecker : public QApplication {
public:
OpenGLInfo(int& argc, char** argv);
OpenGLVersionChecker(int& argc, char** argv);
static bool isValidVersion();
};
#endif // hifi_OpenGLInfo_h
#endif // hifi_OpenGLVersionChecker_h

View file

@ -22,7 +22,7 @@
#include "AddressManager.h"
#include "Application.h"
#include "InterfaceLogging.h"
#include "OpenGLInfo.h"
#include "OpenGLVersionChecker.h"
#include "MainWindow.h"
int main(int argc, const char* argv[]) {
@ -88,8 +88,8 @@ int main(int argc, const char* argv[]) {
// This is done separately from the main Application so that start-up and shut-down logic within the main Application is
// not made more complicated than it already is.
{
OpenGLInfo openGLInfo(argc, const_cast<char**>(argv));
if (!openGLInfo.isValidVersion()) {
OpenGLVersionChecker openGLVersionChecker(argc, const_cast<char**>(argv));
if (!openGLVersionChecker.isValidVersion()) {
qCDebug(interfaceapp, "Early exit due to OpenGL version.");
return 0;
}