Commit d7f6e9a9 authored by Sylvain Thery's avatar Sylvain Thery

Ajout possilité compilation sans Qt

- effet de bord les include qt de Utils/ sont maintenant dans Utils/Qt/
parent 1c2f8544
SET(EXECUTABLE_OUTPUT_PATH ${CGoGN_ROOT_DIR}/bin)
# FOR Qt4
SET(QT_USE_QTOPENGL TRUE)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
#SET(QT_USE_QTOPENGL TRUE)
#INCLUDE(${QT_USE_FILE})
#ADD_DEFINITIONS(${QT_DEFINITIONS})
SET(CGoGN_LIBS_R topology algo container utils)
IF(WIN32)
SET(CGoGN_LIBS_D topology algo container utils) # libs have same name but in different place in Visual
add_subdirectory(Examples/Release)
add_subdirectory(Examples/Tests)
add_subdirectory(Tuto)
ELSE(WIN32)
SET(CGoGN_LIBS_D topologyD algoD containerD utilsD)
add_subdirectory(Examples/Release)
add_subdirectory(Examples/Debug)
add_subdirectory(Examples/Tests)
add_subdirectory(Tuto)
IF (WITH_QT)
add_subdirectory(Examples/Debug)
ENDIF (WITH_QT)
ENDIF(WIN32)
IF (WITH_QT)
add_subdirectory(Tuto)
add_subdirectory(Examples/Release)
ENDIF (WITH_QT)
add_subdirectory(Examples/Tests)
......@@ -5,13 +5,6 @@ project(geometryAssertD)
SET(CMAKE_BUILD_TYPE Debug)
# FOR Qt4
SET(QT_USE_QTOPENGL TRUE)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CGoGN_ROOT_DIR}/include
......@@ -40,7 +33,9 @@ target_link_libraries( Geom_intersectionD
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS})
QT4_WRAP_CPP(concave_rendering_moc concave_rendering.h)
add_executable( concave_renderingD concave_rendering.cpp ${concave_rendering_moc})
target_link_libraries( concave_renderingD
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} )
IF (WITH_QT)
QT4_WRAP_CPP(concave_rendering_moc concave_rendering.h)
add_executable( concave_renderingD concave_rendering.cpp ${concave_rendering_moc})
target_link_libraries( concave_renderingD
${CGoGN_LIBS_D} ${CGoGN_EXT_LIBS} )
ENDIF (WITH_QT)
......@@ -27,7 +27,7 @@
#include <iostream>
#include "Utils/qtSimple.h"
#include "Utils/Qt/qtSimple.h"
#include "Utils/cgognStream.h"
// forward definitions (minimize includes)
......
......@@ -27,12 +27,12 @@
#include <iostream>
#include "Utils/qtSimple.h"
#include "Utils/qtInputs.h"
#include "Utils/Qt/qtSimple.h"
#include "Utils/Qt/qtInputs.h"
#include "ui_clipping.h"
// inclure qtui.h juste après le ui_xxx.h
#include "Utils/qtui.h"
#include "Utils/Qt/qtui.h"
#include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap3.h"
......
......@@ -28,7 +28,7 @@
#include <iostream>
#include "Utils/qtSimple.h"
#include "Utils/Qt/qtSimple.h"
// forward definitions (minimize includes)
namespace CGoGN { namespace Algo { namespace Render { namespace GL2 { class MapRender; }}}}
......
......@@ -27,7 +27,7 @@
#include <iostream>
#include "Utils/qtSimple.h"
#include "Utils/Qt/qtSimple.h"
#include "Utils/frameManipulator.h"
#include "Utils/drawer.h"
......
......@@ -27,7 +27,7 @@
#include <iostream>
#include "Utils/qtSimple.h"
#include "Utils/Qt/qtSimple.h"
// forward definitions (minimize includes)
namespace CGoGN { namespace Algo { namespace Render { namespace GL2 { class MapRender; }}}}
......
......@@ -24,7 +24,7 @@
#include <iostream>
#include "Utils/qtSimple.h"
#include "Utils/Qt/qtSimple.h"
#include "Topology/generic/parameters.h"
#include "Topology/gmap/embeddedGMap2.h"
......
......@@ -24,7 +24,7 @@
#include <iostream>
#include "Utils/qtSimple.h"
#include "Utils/Qt/qtSimple.h"
#include "Topology/generic/parameters.h"
#include "Topology/gmap/embeddedGMap3.h"
......
......@@ -24,7 +24,7 @@
#include <iostream>
#include "Utils/qtSimple.h"
#include "Utils/Qt/qtSimple.h"
#include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap3.h"
......
......@@ -27,7 +27,7 @@
#include <iostream>
#include "Utils/qtSimple.h"
#include "Utils/Qt/qtSimple.h"
#include "Utils/textures.h"
#include "Utils/Shaders/shaderSimpleTexture.h"
#include "Utils/Shaders/shaderTextureMask.h"
......
......@@ -24,9 +24,9 @@
#include <iostream>
#include "Utils/qtSimple.h"
#include "Utils/Qt/qtSimple.h"
#include "ui_viewer.h"
#include "Utils/qtui.h"
#include "Utils/Qt/qtui.h"
#include "Topology/generic/parameters.h"
#include "Topology/map/embeddedMap2.h"
......
......@@ -27,7 +27,7 @@
#include <iostream>
#include "Utils/qtSimple.h"
#include "Utils/Qt/qtSimple.h"
// forward definitions (minimize includes)
namespace CGoGN { namespace Algo { namespace Render { namespace GL2 { class MapRender; } } } }
......
......@@ -27,7 +27,7 @@
#include <iostream>
#include "Utils/qtSimple.h"
#include "Utils/Qt/qtSimple.h"
#include "Utils/cgognStream.h"
// forward definitions (minimize includes)
......
......@@ -27,9 +27,9 @@
#include <iostream>
#include "Utils/qtSimple.h"
#include "Utils/Qt/qtSimple.h"
#include "ui_tuto2.h"
#include "Utils/qtui.h"
#include "Utils/Qt/qtui.h"
#include "Geometry/vector_gen.h"
......
......@@ -25,7 +25,7 @@
#ifndef _TUTO3_H_
#define _TUTO3_H_
#include "Utils/qtSimple.h"
#include "Utils/Qt/qtSimple.h"
// forward definition (minimize includes)
namespace CGoGN { namespace Algo { namespace Render { namespace GL2 { class MapRender; } } } }
......
......@@ -25,11 +25,11 @@
#ifndef _TUTO4_H_
#define _TUTO4_H_
#include "Utils/qtSimple.h"
#include "Utils/Qt/qtSimple.h"
#include "ui_tuto4.h"
// inclure qtui.h juste après le ui_xxx.h
#include "Utils/qtui.h"
#include "Utils/Qt/qtui.h"
// forward definitions (minimize includes) syntax a little bit tricky !!
namespace CGoGN { namespace Algo { namespace Render { namespace GL2 { class MapRender; class TopoRenderMapD; } } } }
......
......@@ -28,11 +28,11 @@
#include <iostream>
#include "Utils/qtSimple.h"
#include "Utils/Qt/qtSimple.h"
#include "ui_tuto5.h"
// inclure qtui.h juste après le ui_xxx.h
#include "Utils/qtui.h"
#include "Utils/Qt/qtui.h"
// forward definitions (minimize includes)
namespace CGoGN { namespace Algo { namespace Render { namespace GL2 { class MapRender; } } } }
......
......@@ -42,7 +42,7 @@
#include "Algo/Parallel/parallel_foreach.h"
// for file input
#include "Utils/qtInputs.h"
#include "Utils/Qt/qtInputs.h"
using namespace CGoGN ;
......
......@@ -27,7 +27,7 @@
#include <iostream>
#include "Utils/qtSimple.h"
#include "Utils/Qt/qtSimple.h"
#include "Utils/cgognStream.h"
// forward definitions (minimize includes)
......
......@@ -44,8 +44,8 @@
#include <QMainWindow>
#include <QWidget>
#include <QtGui>
#include "Utils/qtSimple.h"
#include "Utils/qtgl.h"
#include "Utils/Qt/qtSimple.h"
#include "Utils/Qt/qtgl.h"
using namespace CGoGN;
......
......@@ -52,7 +52,7 @@ SET (CGoGN_EXT_LIBS
IF (WITH_ASSIMP)
add_definitions(-DWITH_ASSIMP)
SET (CGoGN_EXT_INCLUDES ${CGoGN_EXT_INCLUDES} ThirdParty/Assimp/include)
SET (CGoGN_EXT_LIBS ${CGoGN_EXT_LIBS} assimp
SET (CGoGN_EXT_LIBS ${CGoGN_EXT_LIBS} assimp)
ENDIF (WITH_ASSIMP)
IF (WITH_NUMERICAL)
......@@ -101,7 +101,5 @@ ELSE(WIN32)
add_subdirectory(Release)
add_subdirectory(Debug)
add_subdirectory(${CGoGN_ROOT_DIR}/Apps Apps)
if (EXISTS "${CGoGN_ROOT_DIR}/Perso")
add_subdirectory(${CGoGN_ROOT_DIR}/Perso Perso)
endif (EXISTS "${CGoGN_ROOT_DIR}/Perso")
ENDIF(WIN32)
......@@ -11,12 +11,6 @@ ELSE(WIN32)
ENDIF(WIN32)
# FOR Qt4
SET(QT_USE_QTOPENGL TRUE)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CGoGN_ROOT_DIR}/include
......@@ -86,27 +80,34 @@ add_custom_target(shader_targetD ${CGoGN_ROOT_DIR}/bin/shader_to_h ${shaders_src
file(
GLOB_RECURSE
GLOB
files_utils
${CGoGN_ROOT_DIR}/src/Utils/*.cpp
${CGoGN_ROOT_DIR}/include/Utils/*.hpp
${CGoGN_ROOT_DIR}/include/Utils/*.h
)
file(
GLOB_RECURSE
utils_qt_headers
${CGoGN_ROOT_DIR}/include/Utils/qt*.h
)
QT4_WRAP_CPP(UTILS_QT_HEADERS_MOC ${utils_qt_headers})
SET (files_utils_withQt ${files_utils} ${UTILS_QT_HEADERS_MOC})
IF(WITH_QT)
file(
GLOB
files_utils_qt
${CGoGN_ROOT_DIR}/src/Utils/Qt/*.cpp
${CGoGN_ROOT_DIR}/include/Utils/Qt/*.hpp
${CGoGN_ROOT_DIR}/include/Utils/Qt/*.h )
file(
GLOB_RECURSE
utils_qt_headers
${CGoGN_ROOT_DIR}/include/Utils/Qt/qt*.h )
QT4_WRAP_CPP(UTILS_QT_HEADERS_MOC ${utils_qt_headers})
SET (files_utils_withQt ${files_utils} ${files_utils_qt} ${UTILS_QT_HEADERS_MOC})
add_library( utilsD ${files_utils_withQt} )
MESSAGE(STATUS "BIG PB !!!!!!!!!!!!!!!!")
ELSE(WITH_QT)
MESSAGE(STATUS "FILES_UTILS:" ${files_utils})
add_library( utilsD ${files_utils} )
ENDIF (WITH_QT)
add_library(
utilsD
${files_utils_withQt}
)
add_dependencies(utilsD shader_targetD )
......@@ -12,9 +12,9 @@ ELSE(WIN32)
ENDIF(WIN32)
# FOR Qt4
SET(QT_USE_QTOPENGL TRUE)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
#SET(QT_USE_QTOPENGL TRUE)
#INCLUDE(${QT_USE_FILE})
#ADD_DEFINITIONS(${QT_DEFINITIONS})
include_directories(
......@@ -101,7 +101,7 @@ ENDIF(WIN32)
file(
GLOB_RECURSE
GLOB
files_utils
${CGoGN_ROOT_DIR}/src/Utils/*.cpp
${CGoGN_ROOT_DIR}/include/Utils/*.hpp
......@@ -110,19 +110,19 @@ file(
IF(WITH_QT)
file(
GLOB_RECURSE
GLOB
files_utils_qt
${CGoGN_ROOT_DIR}/src/Utils/Qt/*.cpp
${CGoGN_ROOT_DIR}/include/Utils/Qt/*.hpp
${CGoGN_ROOT_DIR}/include/Utils/Qt/*.h
)
${CGoGN_ROOT_DIR}/include/Utils/Qt/*.h )
file(
GLOB_RECURSE
utils_qt_headers
${CGoGN_ROOT_DIR}/include/Utils/qt*.h
)
${CGoGN_ROOT_DIR}/include/Utils/Qt/qt*.h )
QT4_WRAP_CPP(UTILS_QT_HEADERS_MOC ${utils_qt_headers})
SET (files_utils_withQt ${files_utils} ${UTILS_QT_HEADERS_MOC})
SET (files_utils_withQt ${files_utils} ${files_utils_qt} ${UTILS_QT_HEADERS_MOC})
add_library( utils ${files_utils_withQt} )
ELSE(WITH_QT)
add_library( utils ${files_utils} )
......@@ -130,7 +130,6 @@ ENDIF (WITH_QT)
add_dependencies(utils shader_target )
......
......@@ -30,7 +30,7 @@
#include <QMainWindow>
#include <QWidget>
#include <QtGui>
#include "Utils/qtgl.h"
#include "Utils/Qt/qtgl.h"
#include <set>
#include <string>
#include "Geometry/vector_gen.h"
......
......@@ -22,8 +22,8 @@
* *
*******************************************************************************/
#include "Utils/qtSimple.h"
#include "Utils/qtgl.h"
#include "Utils/Qt/qtSimple.h"
#include "Utils/Qt/qtgl.h"
#include "Utils/GLSLShader.h"
#include "glm/gtc/matrix_transform.hpp"
#include "glm/gtc/type_precision.hpp"
......
......@@ -24,10 +24,9 @@
#include <GL/glew.h>
#include <iostream>
#include "Utils/qtgl.h"
#include "Utils/trackball.h"
#include "Utils/qtSimple.h"
#include "Utils/Qt/qtgl.h"
#include "Utils/Qt/qtSimple.h"
#include "glm/gtc/type_precision.hpp"
#include "Utils/GLSLShader.h"
......
......@@ -21,7 +21,7 @@
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#include "Utils/qtInputs.h"
#include "Utils/Qt/qtInputs.h"
#include <iostream>
namespace CGoGN
......
......@@ -23,8 +23,8 @@
*******************************************************************************/
#include "Utils/cgognStream.h"
#include "Utils/qtSimple.h"
#ifndef NO_QT
#ifdef WITH_QT
#include "Utils/Qt/qtSimple.h"
#include <QtGui/QTextEdit>
#endif
namespace CGoGN
......
......@@ -25,7 +25,6 @@
#include "Utils/text3d.h"
#include "Utils/vbo.h"
#include <QImage>
namespace CGoGN
{
......@@ -49,14 +48,18 @@ Strings3D::Strings3D(bool withBackground, const Geom::Vec3f& bgc) : m_nbChars(0)
if (m_idTexture == 0xffffffff)
{
std::string font_filename = Utils::GLSLShader::findFile("font_cgogn.png");
QImage img(font_filename.c_str());
igzstream fs(font_filename.c_str(), std::ios::in|std::ios::binary);
char* buff = new char[WIDTHTEXTURE*HEIGHTTEXTURE];
fs.read(reinterpret_cast<char*>(buff), WIDTHTEXTURE*HEIGHTTEXTURE );
fs.close();
glGenTextures(1, &m_idTexture);
glBindTexture(GL_TEXTURE_2D, m_idTexture);
glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, WIDTHTEXTURE, HEIGHTTEXTURE, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, (GLvoid*)(img.bits()));
glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, WIDTHTEXTURE, HEIGHTTEXTURE, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, (GLvoid*)(buff));
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
delete[] buff;
}
std::string glxvert(*GLSLShader::DEFINES_GL);
......
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