Commit 77c64075 authored by Thery Sylvain's avatar Thery Sylvain

cleaning of GL/glew includes

parent aae2b76b
...@@ -135,6 +135,7 @@ IF(APPLE) ...@@ -135,6 +135,7 @@ IF(APPLE)
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined -Wl,dynamic_lookup") SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined -Wl,dynamic_lookup")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMAC_OSX") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMAC_OSX")
SET(CMAKE_OSX_ARCHITECTURES x86_64) SET(CMAKE_OSX_ARCHITECTURES x86_64)
SET (CGoGN_EXT_LIBS ${CGoGN_EXT_LIBS} "-framework Foundation -framework cocoa" )
ENDIF(APPLE) ENDIF(APPLE)
IF(WIN32) IF(WIN32)
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* * * *
*******************************************************************************/ *******************************************************************************/
#include <GL/glew.h> #include "Utils/gl_def.h"
#include "Geometry/transfo.h" #include "Geometry/transfo.h"
namespace CGoGN namespace CGoGN
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#ifndef _COLOR_PER_FACE_RENDER #ifndef _COLOR_PER_FACE_RENDER
#define _COLOR_PER_FACE_RENDER #define _COLOR_PER_FACE_RENDER
#include <GL/glew.h>
#include "Topology/generic/dart.h" #include "Topology/generic/dart.h"
#include "Topology/generic/attributeHandler.h" #include "Topology/generic/attributeHandler.h"
......
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
#ifndef _EXPLODE_VOLUME_VBO_RENDER #ifndef _EXPLODE_VOLUME_VBO_RENDER
#define _EXPLODE_VOLUME_VBO_RENDER #define _EXPLODE_VOLUME_VBO_RENDER
#include <GL/glew.h>
#include <vector> #include <vector>
#include <list> #include <list>
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#define _USE_MATH_DEFINES #define _USE_MATH_DEFINES
#include <cmath> #include <cmath>
#include <GL/glew.h>
#include <vector> #include <vector>
#include <list> #include <list>
#include <set> #include <set>
......
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
#ifndef _TOPO3_VBO_RENDER #ifndef _TOPO3_VBO_RENDER
#define _TOPO3_VBO_RENDER #define _TOPO3_VBO_RENDER
#include <GL/glew.h>
#include <vector> #include <vector>
#include <list> #include <list>
......
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
#ifndef _GL2_TOPO_RENDER_ #ifndef _GL2_TOPO_RENDER_
#define _GL2_TOPO_RENDER_ #define _GL2_TOPO_RENDER_
#include <GL/glew.h>
#include <vector> #include <vector>
#include <list> #include <list>
......
//#include <QApplication>
#include <QGLWidget>
#include <QGLContext>
#include <iostream>
//external Objective C function
void* select_3_2_mac_visual(GDHandle handle);
namespace CGoGN
{
/// Use with GLWidget(...):QGLWidget(new Core3_2_context(QGLFormat::defaultFormat()))
/// check with std::cout<<glGetString(GL_VERSION)<<std::endl;
struct Core3_2_context : public QGLContext
{
Core3_2_context(const QGLFormat& format, QPaintDevice* device) : QGLContext(format,device) {}
Core3_2_context(const QGLFormat& format) : QGLContext(format) {}
virtual void* chooseMacVisual(GDHandle handle)
{
return select_3_2_mac_visual(handle);
}
};
}
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#ifndef __QT_GL2__ #ifndef __QT_GL2__
#define __QT_GL2__ #define __QT_GL2__
#include <GL/glew.h> #include "Utils/gl_def.h"
#include <QGLWidget> #include <QGLWidget>
#include <QMouseEvent> #include <QMouseEvent>
#include <QKeyEvent> #include <QKeyEvent>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#define _CGOGN_DRAWER_H_ #define _CGOGN_DRAWER_H_
#include <vector> #include <vector>
#include <GL/glew.h> #include "Utils/gl_def.h"
#include "Geometry/vector_gen.h" #include "Geometry/vector_gen.h"
namespace CGoGN { namespace Utils { class VBO; } } namespace CGoGN { namespace Utils { class VBO; } }
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#ifndef __CGoGN_GLSL_FBO__ #ifndef __CGoGN_GLSL_FBO__
#define __CGoGN_GLSL_FBO__ #define __CGoGN_GLSL_FBO__
#include <GL/glew.h>
#include "Utils/gl_def.h" #include "Utils/gl_def.h"
#include <iostream> #include <iostream>
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include "Utils/gl_def.h" #include "Utils/gl_def.h"
#include "Geometry/vector_gen.h" #include "Geometry/vector_gen.h"
#include <GL/glew.h>
#include <string> #include <string>
#include <QImage> #include <QImage>
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include <vector> #include <vector>
#include <GL/glew.h>
#include "Utils/gl_def.h" #include "Utils/gl_def.h"
#include "Topology/generic/attributeHandler.h" #include "Topology/generic/attributeHandler.h"
#include "Container/convert.h" #include "Container/convert.h"
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#ifndef _VBO_RENDER_ #ifndef _VBO_RENDER_
#define _VBO_RENDER_ #define _VBO_RENDER_
#include <GL/glew.h> #include "Utils/gl_def.h"
namespace CGoGN namespace CGoGN
{ {
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
* * * *
*******************************************************************************/ *******************************************************************************/
#include <GL/glew.h>
#include <iostream> #include <iostream>
#include "Utils/trackball.h" #include "Utils/trackball.h"
#include "Utils/Qt/qtgl.h" #include "Utils/Qt/qtgl.h"
...@@ -30,6 +29,9 @@ ...@@ -30,6 +29,9 @@
#include "glm/gtc/type_precision.hpp" #include "glm/gtc/type_precision.hpp"
#include "Utils/GLSLShader.h" #include "Utils/GLSLShader.h"
#ifdef MAC_OSX
#include "Utils/Qt/macgl3.h"
#endif
namespace CGoGN namespace CGoGN
{ {
...@@ -42,7 +44,12 @@ namespace QT ...@@ -42,7 +44,12 @@ namespace QT
float GLWidget::FAR_PLANE = 500.0f; float GLWidget::FAR_PLANE = 500.0f;
GLWidget::GLWidget(SimpleQT* cbs, QWidget *parent) : GLWidget::GLWidget(SimpleQT* cbs, QWidget *parent) :
#ifdef MAC_OSX
// QGLWidget(new Core3_2_context(QGLFormat::defaultFormat()),parent),
QGLWidget(QGLFormat(QGL::Rgba | QGL::DoubleBuffer| QGL::DepthBuffer), parent), QGLWidget(QGLFormat(QGL::Rgba | QGL::DoubleBuffer| QGL::DepthBuffer), parent),
#else
QGLWidget(QGLFormat(QGL::Rgba | QGL::DoubleBuffer| QGL::DepthBuffer), parent),
#endif
m_cbs(cbs), m_cbs(cbs),
m_state_modifier(0), m_state_modifier(0),
allow_rotation(true) allow_rotation(true)
...@@ -186,6 +193,7 @@ glm::vec3& GLWidget::getObjPos() ...@@ -186,6 +193,7 @@ glm::vec3& GLWidget::getObjPos()
void GLWidget::initializeGL() void GLWidget::initializeGL()
{ {
std::cout << "GL VERSION = "<< glGetString(GL_VERSION)<< std::endl;
glEnable(GL_DEPTH_TEST); glEnable(GL_DEPTH_TEST);
if (m_cbs) if (m_cbs)
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
* * * *
*******************************************************************************/ *******************************************************************************/
#include <GL/glew.h>
#include "Utils/Shaders/shaderColorPerVertex.h" #include "Utils/Shaders/shaderColorPerVertex.h"
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
* * * *
*******************************************************************************/ *******************************************************************************/
#include <GL/glew.h>
#include "Utils/Shaders/shaderEnvMap.h" #include "Utils/Shaders/shaderEnvMap.h"
#include <string.h> #include <string.h>
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
*******************************************************************************/ *******************************************************************************/
#include <string.h> #include <string.h>
#include <GL/glew.h>
#include "Utils/Shaders/shaderExplodeVolumes.h" #include "Utils/Shaders/shaderExplodeVolumes.h"
namespace CGoGN namespace CGoGN
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
*******************************************************************************/ *******************************************************************************/
#include <string.h> #include <string.h>
#include <GL/glew.h>
#include "Utils/Shaders/shaderExplodeVolumesLines.h" #include "Utils/Shaders/shaderExplodeVolumesLines.h"
namespace CGoGN namespace CGoGN
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
*******************************************************************************/ *******************************************************************************/
#include <string.h> #include <string.h>
#include <GL/glew.h>
#include "Utils/Shaders/shaderFlat.h" #include "Utils/Shaders/shaderFlat.h"
namespace CGoGN namespace CGoGN
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
*******************************************************************************/ *******************************************************************************/
#include <string> #include <string>
#include <GL/glew.h>
#include "Utils/Shaders/shaderFlatColor.h" #include "Utils/Shaders/shaderFlatColor.h"
namespace CGoGN namespace CGoGN
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
*******************************************************************************/ *******************************************************************************/
#include <string> #include <string>
#include <GL/glew.h>
#include "Utils/Shaders/shaderIsoLines.h" #include "Utils/Shaders/shaderIsoLines.h"
namespace CGoGN namespace CGoGN
......
...@@ -22,10 +22,8 @@ ...@@ -22,10 +22,8 @@
* * * *
*******************************************************************************/ *******************************************************************************/
#include <GL/glew.h>
#include "Utils/Shaders/shaderScalarField.h" #include "Utils/Shaders/shaderScalarField.h"
namespace CGoGN namespace CGoGN
{ {
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
* * * *
*******************************************************************************/ *******************************************************************************/
#include <GL/glew.h>
#include "Utils/Shaders/shaderSimpleColor.h" #include "Utils/Shaders/shaderSimpleColor.h"
namespace CGoGN namespace CGoGN
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#ifdef WITH_QT #ifdef WITH_QT
#include <GL/glew.h>
#include "Utils/Shaders/shaderSimpleTexture.h" #include "Utils/Shaders/shaderSimpleTexture.h"
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
*******************************************************************************/ *******************************************************************************/
#ifdef WITH_QT #ifdef WITH_QT
#include <GL/glew.h>
#include "Utils/Shaders/shaderTextureMask.h" #include "Utils/Shaders/shaderTextureMask.h"
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
* * * *
*******************************************************************************/ *******************************************************************************/
#include <GL/glew.h>
#include "Utils/Shaders/shaderVectorPerVertex.h" #include "Utils/Shaders/shaderVectorPerVertex.h"
namespace CGoGN namespace CGoGN
......
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