mirror of
https://github.com/lubosz/overte.git
synced 2025-04-27 20:15:29 +02:00
Solving the coimpiling issue with Render-utils test
This commit is contained in:
parent
76acbde595
commit
17650dde74
1 changed files with 9 additions and 18 deletions
|
@ -19,6 +19,10 @@
|
|||
#include <QFile>
|
||||
#include <QImage>
|
||||
#include <QLoggingCategory>
|
||||
|
||||
#include <gpu/Context.h>
|
||||
#include <gpu/GLBackend.h>
|
||||
|
||||
#include <QOpenGLBuffer>
|
||||
#include <QOpenGLContext>
|
||||
#include <QOpenGLDebugLogger>
|
||||
|
@ -29,7 +33,7 @@
|
|||
#include <QTime>
|
||||
#include <QTimer>
|
||||
#include <QWindow>
|
||||
#include <gpu/Context.h>
|
||||
|
||||
|
||||
|
||||
#include <PathUtils.h>
|
||||
|
@ -90,6 +94,7 @@ class QTestWindow : public QWindow {
|
|||
QSize _size;
|
||||
//TextRenderer* _textRenderer[4];
|
||||
RateCounter fps;
|
||||
gpu::ContextPointer _gpuContext;
|
||||
|
||||
protected:
|
||||
void renderText();
|
||||
|
@ -119,6 +124,9 @@ public:
|
|||
|
||||
show();
|
||||
makeCurrent();
|
||||
_gpuContext.reset(new gpu::Context(new gpu::GLBackend()));
|
||||
|
||||
|
||||
|
||||
{
|
||||
QOpenGLDebugLogger* logger = new QOpenGLDebugLogger(this);
|
||||
|
@ -131,23 +139,6 @@ public:
|
|||
}
|
||||
qDebug() << (const char*)glGetString(GL_VERSION);
|
||||
|
||||
#ifdef WIN32
|
||||
glewExperimental = true;
|
||||
GLenum err = glewInit();
|
||||
if (GLEW_OK != err) {
|
||||
/* Problem: glewInit failed, something is seriously wrong. */
|
||||
const GLubyte * errStr = glewGetErrorString(err);
|
||||
qDebug("Error: %s\n", errStr);
|
||||
}
|
||||
qDebug("Status: Using GLEW %s\n", glewGetString(GLEW_VERSION));
|
||||
|
||||
if (wglewGetExtension("WGL_EXT_swap_control")) {
|
||||
int swapInterval = wglGetSwapIntervalEXT();
|
||||
qDebug("V-Sync is %s\n", (swapInterval > 0 ? "ON" : "OFF"));
|
||||
}
|
||||
glGetError();
|
||||
#endif
|
||||
|
||||
//_textRenderer[0] = TextRenderer::getInstance(SANS_FONT_FAMILY, 12, false);
|
||||
//_textRenderer[1] = TextRenderer::getInstance(SERIF_FONT_FAMILY, 12, false,
|
||||
// TextRenderer::SHADOW_EFFECT);
|
||||
|
|
Loading…
Reference in a new issue