Commit 17cba59c authored by Hans-Christian Ebke's avatar Hans-Christian Ebke
Browse files

Qt5 compat fixes.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@18902 383ad7c9-94d9-4d36-a494-682f7c89f535
parent cd46b783
......@@ -58,9 +58,7 @@
#include <ACG/Scenegraph/BaseNode.hh>
#include <ACG/Scenegraph/DrawModes.hh>
#undef QT_NO_OPENGL
#include <QGLWidget>
#define QT_NO_OPENGL
//== FORWARDDECLARATIONS ======================================================
......
......@@ -58,9 +58,7 @@
#include <ACG/Scenegraph/BaseNode.hh>
#include <ACG/Scenegraph/DrawModes.hh>
#undef QT_NO_OPENGL
#include <QGLWidget>
#define QT_NO_OPENGL
#include <QImage>
//== FORWARDDECLARATIONS ======================================================
......
......@@ -40,6 +40,8 @@
* *
\*===========================================================================*/
#include <GL/glew.h>
#include "PlaneNode.hh"
#include <ACG/GL/gl.hh>
#include <iostream>
......
......@@ -40,6 +40,7 @@
* *
\*===========================================================================*/
#include <GL/glew.h>
#include "QtWidgetNode.hh"
#include <ACG/GL/gl.hh>
#include <iostream>
......@@ -51,9 +52,7 @@
#include <QMouseEvent>
#include <QApplication>
#undef QT_NO_OPENGL
#include <QGLWidget>
#define QT_NO_OPENGL
//== NAMESPACES ===============================================================
......@@ -118,7 +117,7 @@ QtWidgetNode::QtWidgetNode(QWidget* _widget, BaseNode *_parent, std::string _nam
QtWidgetNode::~QtWidgetNode()
{
if ( vbo_)
glDeleteBuffers(1,&vbo_);
GLState::deleteBuffers(1,&vbo_);
if (texID_)
glDeleteTextures(1,&texID_);
......
......@@ -49,6 +49,7 @@
//== INCLUDES ====================================================
#include <GL/glew.h>
#include "SplatCloudNode.hh"
......
......@@ -1835,7 +1835,7 @@ GLuint VolumeMeshBufferManager<VolumeMesh>::getBuffer()
{
if (mBuffer == 0)
glGenBuffers(1, &mBuffer);
ACG::GLState::genBuffers(1, &mBuffer);
calculateVertexDeclaration();
......@@ -1850,9 +1850,10 @@ GLuint VolumeMeshBufferManager<VolumeMesh>::getBuffer()
unsigned int bufferSize = mVertexSize * numOfVertices;
ACG::GLState::bindBuffer(GL_ARRAY_BUFFER, mBuffer);
glBufferData(GL_ARRAY_BUFFER, bufferSize, 0, GL_STATIC_DRAW);
ACG::GLState::bufferData(GL_ARRAY_BUFFER, bufferSize, 0, GL_STATIC_DRAW);
unsigned char* buffer = (unsigned char *) glMapBuffer(GL_ARRAY_BUFFER, GL_READ_WRITE);
unsigned char* buffer = (unsigned char *) ACG::GLState::mapBuffer(
GL_ARRAY_BUFFER, GL_READ_WRITE);
if (buffer)
{
......@@ -1867,7 +1868,7 @@ GLuint VolumeMeshBufferManager<VolumeMesh>::getBuffer()
buildTexCoordBuffer(buffer);
glUnmapBuffer(GL_ARRAY_BUFFER);
ACG::GLState::unmapBuffer(GL_ARRAY_BUFFER);
ACG::GLState::bindBuffer(GL_ARRAY_BUFFER, 0);
......@@ -1908,7 +1909,7 @@ GLuint VolumeMeshBufferManager<VolumeMesh>::getPickBuffer(ACG::GLState &_state,
if ((mBuffer == 0) || optionsChanged() || mInvalidated)
{
if (mBuffer == 0)
glGenBuffers(1, &mBuffer);
ACG::GLState::genBuffers(1, &mBuffer);
calculateVertexDeclaration();
......@@ -1923,9 +1924,9 @@ GLuint VolumeMeshBufferManager<VolumeMesh>::getPickBuffer(ACG::GLState &_state,
unsigned int bufferSize = mVertexSize * numOfVertices;
ACG::GLState::bindBuffer(GL_ARRAY_BUFFER, mBuffer);
glBufferData(GL_ARRAY_BUFFER, bufferSize, 0, GL_STATIC_DRAW);
ACG::GLState::bufferData(GL_ARRAY_BUFFER, bufferSize, 0, GL_STATIC_DRAW);
unsigned char* buffer = (unsigned char *) glMapBuffer(GL_ARRAY_BUFFER, GL_READ_WRITE);
unsigned char* buffer = (unsigned char *) ACG::GLState::mapBuffer(GL_ARRAY_BUFFER, GL_READ_WRITE);
if (buffer)
{
......@@ -1935,7 +1936,7 @@ GLuint VolumeMeshBufferManager<VolumeMesh>::getPickBuffer(ACG::GLState &_state,
if (colorsNeedRebuild())
buildPickColorBuffer(_state, _offset, buffer);
glUnmapBuffer(GL_ARRAY_BUFFER);
ACG::GLState::unmapBuffer(GL_ARRAY_BUFFER);
ACG::GLState::bindBuffer(GL_ARRAY_BUFFER, 0);
......@@ -2025,7 +2026,7 @@ template <class VolumeMesh>
void VolumeMeshBufferManager<VolumeMesh>::free()
{
if (mBuffer != 0)
glDeleteBuffers(1, &mBuffer);
ACG::GLState::deleteBuffers(1, &mBuffer);
mBuffer = 0;
......
......@@ -477,7 +477,7 @@ void VolumeMeshNodeT<VolumeMeshT>::drawSelection(GLState& _state, const DrawMode
GLint currentProgramm;
glGetIntegerv(GL_CURRENT_PROGRAM, &currentProgramm);
//disable shader for drawing of the selecttion
glUseProgram(0);
ACG::GLState::useProgram(0);
GLState::enable(GL_DEPTH_TEST);
GLState::depthFunc(GL_LEQUAL);
......@@ -541,7 +541,7 @@ void VolumeMeshNodeT<VolumeMeshT>::drawSelection(GLState& _state, const DrawMode
glLineWidth(_state.line_width());
glUseProgram(currentProgramm);
ACG::GLState::useProgram(currentProgramm);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment