Commit 088454ed authored by Martin Schultz's avatar Martin Schultz
Browse files

Revert "Merge branch 'newGLLoader' into 'master'

As the new glLoad is not compatible with Qt 5.6 we will continue using
glew for now.

This reverts commit 22938119, reversing
changes made to ed8a9a65.
parent 02a94b65
......@@ -52,7 +52,7 @@
#include <OpenFlipper/common/GlobalDefines.hh>
DLLEXPORT void initOpenGLFunctions();
DLLEXPORT const char * getOpenGLVersion();
DLLEXPORT void initGlew();
DLLEXPORT const char * getGlewVersion();
#endif /* GLEW_WRAPPERS_HH_ */
......@@ -60,7 +60,6 @@
//== INCLUDES =================================================================
#include <common/glew_wrappers.hh>
#include "CoreWidget.hh"
#include <OpenFlipper/common/FileTypes.hh>
......@@ -593,12 +592,11 @@ void CoreWidget::showAboutWidget( ) {
#ifndef __APPLE__
aboutWidget_->OpenFlipperAbout->append("\n");
aboutWidget_->OpenFlipperAbout->setCurrentFont(boldFont);
aboutWidget_->OpenFlipperAbout->append(tr("OpenGL Specific Info:"));
aboutWidget_->OpenFlipperAbout->append(tr("GLEW Specific Info:"));
aboutWidget_->OpenFlipperAbout->setCurrentFont(standardFont);
//TODO: rename this we are not using glew anymore
QString glewVersion = QString(getOpenGLVersion());
aboutWidget_->OpenFlipperAbout->append(tr("OpenGL Version:\t") + glewVersion);
QString glewVersion = QString(getGlewVersion());
aboutWidget_->OpenFlipperAbout->append(tr("GLEW Version:\t") + glewVersion);
#endif
// =====================================================================================
......
......@@ -72,7 +72,6 @@
// -------------------- Qt event Includes
#include <QGLFormat>
#include "common/glew_wrappers.hh"
#define WIDGET_HEIGHT 800
#define WIDGET_WIDTH 800
......@@ -250,7 +249,6 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
#endif
glWidget_ = new QGLWidget(format,0);
glWidget_->makeCurrent();
PluginFunctions::shareGLWidget (glWidget_);
glView_ = new QtGLGraphicsView(stackedWidget_);
......@@ -319,8 +317,6 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
// Create examiner
// ======================================================================
initOpenGLFunctions();
// First we analyze the scenegraph
unsigned int maxPases = 1;
ACG::Vec3d bbmin,bbmax;
......
......@@ -67,7 +67,6 @@
#include <set>
#include "OpenFlipper/common/Types.hh"
#include <OpenFlipper/common/GlobalOptions.hh>
#include <OpenFlipper/BasePlugin/ContextMenuInterface.hh>
......
......@@ -110,11 +110,9 @@ void QtGLGraphicsScene::drawBackground(QPainter *_painter, const QRectF &_rect)
static bool initialized = false;
if (!initialized)
{
// we use glLoadGen to manage extensions :/
// we use GLEW to manage extensions
// initialize it first
#ifndef __APPLE__
ogl_LoadFunctions(); //maybe replace this with a call to the wrapper function. initOpenGLFunctions()
#endif
glewInit();
for (unsigned int i = 0; i < views_->size (); i++)
{
views_->at(i)->initializeGL ();
......
......@@ -114,10 +114,10 @@ void SimpleGLGraphicsScene::drawBackground(QPainter *_painter, const QRectF &_re
if (!initialized_)
{
// we use glLoadGen to manage extensions
// we use GLEW to manage extensions
// initialize it first
#ifndef __APPLE__
ogl_LoadFunctions();
glewInit();
#endif
view_->initializeGL();
cursorPainter_->initializeGL ();
......
......@@ -54,10 +54,6 @@
#include <OpenFlipper/common/GlobalOptions.hh>
#include <OpenFlipper/BasePlugin/PluginFunctions.hh>
#ifndef GL_TEXTURE_RECTANGLE_EXT
#define GL_TEXTURE_RECTANGLE_EXT 0x84F5
#endif
void DepthPeelingPlugin::reloadResources(int _viewerId) {
// called in constructor and resizeEvent()
......
......@@ -965,3 +965,25 @@ function (generate_qhp_file files_loc plugin_name)
endforeach()
endfunction()
function(acg_test_glew_definition _def _out)
include(CheckCXXSourceRuns)
set(CMAKE_REQUIRED_INCLUDES ${GLEW_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LIBRARIES ${GLEW_LIBRARIES})
set(CMAKE_REQUIRED_DEFINITIONS -DCHECKING=${_def})
if(GLEW_FOUND)
if(NOT ${_out})
unset(${_out} CACHE) #clear cache, if previous test failed and try again
endif()
CHECK_CXX_SOURCE_RUNS("
#include <GL/glew.h>
int main()
{
#ifdef ${_def}
return 0;
#else
return 1;
#endif
}"
${_out})
endif()
endfunction()
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