This change reverts PolyVox back to using Qt 4.8. This is expected to be a temporary change, required because moving to Qt 5 caused various complications on Windows which we are not yet ready to address.
For more details see here: https://bitbucket.org/volumesoffun/polyvox/issue/41/upgrade-to-qt-5
This commit is contained in:
@ -19,6 +19,8 @@
|
||||
# 3. This notice may not be removed or altered from any source
|
||||
# distribution.
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||
|
||||
PROJECT(BasicExample)
|
||||
|
||||
#Projects source files
|
||||
@ -42,7 +44,7 @@ SOURCE_GROUP("Headers" FILES ${INC_FILES})
|
||||
FIND_PACKAGE(OpenGL REQUIRED)
|
||||
|
||||
#Tell CMake the paths for OpenGL and for PolyVox (which is just relative to our current location)
|
||||
INCLUDE_DIRECTORIES(${PolyVoxCore_BINARY_DIR}/include ${PolyVoxCore_SOURCE_DIR}/include ${GLEW_SOURCE_DIR})
|
||||
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR} ${PolyVoxCore_BINARY_DIR}/include ${PolyVoxCore_SOURCE_DIR}/include ${GLEW_SOURCE_DIR})
|
||||
LINK_DIRECTORIES(${PolyVoxCore_BINARY_DIR})
|
||||
|
||||
#Build
|
||||
@ -50,7 +52,7 @@ ADD_EXECUTABLE(BasicExample ${SRC_FILES})
|
||||
IF(MSVC)
|
||||
SET_TARGET_PROPERTIES(BasicExample PROPERTIES COMPILE_FLAGS "/W4 /wd4127")
|
||||
ENDIF(MSVC)
|
||||
TARGET_LINK_LIBRARIES(BasicExample glew Qt5::OpenGL ${OPENGL_gl_LIBRARY} PolyVoxCore)
|
||||
TARGET_LINK_LIBRARIES(BasicExample glew ${QT_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} PolyVoxCore)
|
||||
SET_PROPERTY(TARGET BasicExample PROPERTY FOLDER "Examples")
|
||||
|
||||
#Install - Only install the example in Windows
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include <QMouseEvent>
|
||||
#include <QMatrix4x4>
|
||||
#include <QtMath>
|
||||
//#include <QtMath>
|
||||
|
||||
using namespace PolyVox;
|
||||
using namespace std;
|
||||
@ -73,7 +73,7 @@ void OpenGLWidget::initializeGL()
|
||||
glDepthFunc(GL_LEQUAL);
|
||||
glDepthRange(0.0, 1.0);
|
||||
|
||||
if(!shader.addShaderFromSourceCode(QOpenGLShader::Vertex, R"(
|
||||
if (!shader.addShaderFromSourceCode(QGLShader::Vertex, R"(
|
||||
#version 140
|
||||
|
||||
in vec4 position; //This will be the position of the vertex in model-space
|
||||
@ -96,7 +96,7 @@ void OpenGLWidget::initializeGL()
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if(!shader.addShaderFromSourceCode(QOpenGLShader::Fragment, R"(
|
||||
if (!shader.addShaderFromSourceCode(QGLShader::Fragment, R"(
|
||||
#version 130
|
||||
|
||||
in vec4 worldPosition; //Passed in from the vertex shader
|
||||
|
@ -29,7 +29,7 @@ distribution.
|
||||
#include "glew/glew.h"
|
||||
|
||||
#include <QGLWidget>
|
||||
#include <QOpenGLShaderProgram>
|
||||
#include <QGLShaderProgram>
|
||||
|
||||
class OpenGLWidget : public QGLWidget
|
||||
{
|
||||
@ -57,7 +57,7 @@ private:
|
||||
GLuint vertexBuffer;
|
||||
GLuint vertexArrayObject;
|
||||
|
||||
QOpenGLShaderProgram shader;
|
||||
QGLShaderProgram shader;
|
||||
|
||||
//Mouse data
|
||||
QPoint m_LastFrameMousePos;
|
||||
|
Reference in New Issue
Block a user