Commit 5c96d99d authored by thery's avatar thery

MAJ compilation sous windows

parent c296fc49
......@@ -334,13 +334,13 @@ void MyQT::cb_initGL()
m_shader = new Utils::ShaderPhong();
m_shader->setAttributePosition(m_positionVBO);
m_shader->setAttributeNormal(m_normalVBO);
m_shader->setDiffuse(Geom::Vec4f(0.,0.6,0.,0.));
m_shader->setSpecular(Geom::Vec4f(0.,0.0,0.,0.)); // no specular
m_shader->setDiffuse(Geom::Vec4f(0.0f,0.6f,0.0f,0.0f));
m_shader->setSpecular(Geom::Vec4f(0.0f,0.0f,0.0f,0.0f)); // no specular
// using simple shader with color
m_shader2 = new Utils::ShaderSimpleColor();
m_shader2->setAttributePosition(m_positionVBO);
m_shader2->setColor(Geom::Vec4f(0.,0.1,0.,0.));
m_shader2->setColor(Geom::Vec4f(0.0f,0.1f,0.0f,0.0f));
registerShader(m_shader);
registerShader(m_shader2);
}
......
......@@ -160,7 +160,7 @@ void MyQT::cb_initGL()
m_sprite = new Utils::PointSprite();
m_sprite->setAttributePosition(m_positionVBO);
m_strings = new Utils::Strings3D(true, Geom::Vec3f(0.1,0.,0.3));
m_strings = new Utils::Strings3D(true, Geom::Vec3f(0.1f,0.0f,0.3f));
storeVerticesInfo();
m_strings->sendToVBO();
......@@ -192,7 +192,7 @@ void MyQT::cb_initGL()
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::LINES);
m_render->initPrimitives<PFP>(myMap, allDarts, Algo::Render::GL2::POINTS);
m_render_topo->updateData<PFP>(myMap, allDarts, position, 0.9, 0.9, 0.9);
m_render_topo->updateData<PFP>(myMap, allDarts, position, 0.9f, 0.9f, 0.9f);
// timer example for animation
......@@ -284,7 +284,7 @@ int main(int argc, char **argv)
{
position = myMap.addAttribute<PFP::VEC3>(VERTEX, "position");
CGoGNout << 5.34 << " toto "<< Geom::Vec3f(2.5, 2.2, 4.3) << CGoGNendl;
CGoGNout << 5.34 << " toto "<< Geom::Vec3f(2.5f, 2.2f, 4.3f) << CGoGNendl;
CGoGNout << 3 << " tutu "<< 4 <<CGoGNendl;
......@@ -307,11 +307,11 @@ int main(int argc, char **argv)
sqt.setHelpMsg("Enter pour dock on/off\nShift Enter pour console on/off\nShift Click gauche pour selectionner un brin");
CGoGNout.toStatusBar(&sqt);
CGoGNout << "CGoGNOut StatusBar" << Geom::Vec3f(2.5, 2.2, 4.3) << CGoGNendl;
CGoGNout << "CGoGNOut StatusBar" << Geom::Vec3f(2.5f, 2.2f, 4.3f) << CGoGNendl;
CGoGNout.toConsole(&sqt);
CGoGNout << "CGoGNOut dans la console" << Geom::Vec3f(2.5, 2.2, 4.3) << CGoGNendl;
CGoGNout << "CGoGNOut dans la console" << Geom::Vec3f(2.5f, 2.2f, 4.3f) << CGoGNendl;
CGoGNout.toStatusBar(NULL);
CGoGNout << "tirelipinpon .." << CGoGNendl;
......
......@@ -2,26 +2,33 @@ Prérequis:
Visual Studio ou C++ Express (au moins 2005)
CMake (au moins 2.6)
Unziper le windows_dependencies.zip (http://iggservis.u-strasbg.fr/Data/) a la racine de CGoGN
Lancer CMake
Mettre le chemin de la racine de CGoGN + /ThirdParty pour les sources
Mettre le chemin de la racine de CGoGN + /ThirdParty/Visual (par exemple) pour le build
Cliquer sur Configure
Choisir le bon compilateur (celui de votre version de Visual C++)
Recliquer sur Configure
Cliquer sur Generate
Aller compiler sous visual(en release)
Relancer CMake
Mettre le chemin de la racine de CGoGN + /build pour les sources
Mettre le chemin de la racine de CGoGN + /Visual (par exemple) pour le build
ajouter deux entrees dans le cache (pour utilisation de boost precompile: www.boostpro.com)
boost_path avec le chemin d'acces (exemple: C:\Program Files\boost\boost_1_44\)
boost_extension avec ce que vous voulez utiliser (exemple: -vc100-mt-1_44)
Cliquer sur Configure
Choisir le bon compilateur (celui de votre version de Visual C++)
Recliquer sur Configure
Cliquer sur Generate
Unziper le windows_dependencies.zip (http://iggservis.u-strasbg.fr/Data/) a la racine de CGoGN
Aller dans Visual et double-cliquer sur CGoGN.sln !!
Pour que les executables fonctionnent ajouter le chemin vers les dll dans la variable d'environnement path
(ou copier les dll dans un répertoire déjà dans le path)
Remarque pour l'utilisation de boost (manière simple):
-installer les binaires a l'aide de boostpro (www.boostpro.com)
-definir la varible d'env "boost_extension" avec ce que vous voulez utiliser (exemple: -vc100-mt-1_44)
-definir la varible d'env "boost_path" avec le chemin d'acces (exemple: C:\Program Files\boost\boost_1_44\)
-ajouter le chemin vers les dll dans le path (comme cf ci-dessus)
......
......@@ -39,15 +39,15 @@ IF(WIN32)
MACRO(BOOST_LIBS lib_lists names)
SET (${lib_lists} "")
FOREACH(name ${names})
STRING(REGEX REPLACE "-mt" $ENV{boost_extension} newname ${name})
STRING(REGEX REPLACE "-mt" ${boost_extension} newname ${name})
SET (${lib_lists} ${${lib_lists}} ${newname} )
ENDFOREACH(name)
ENDMACRO(BOOST_LIBS)
set (BOOST_INCLUDE_PATH $ENV{boost_path})
set (BOOST_INCLUDE_PATH ${boost_path})
INCLUDE_DIRECTORIES(${CGoGN_ROOT_DIR}/windows_dependencies/include/)
LINK_DIRECTORIES(${CGoGN_ROOT_DIR}/windows_dependencies/lib/ $ENV{boost_path}/lib)
LINK_DIRECTORIES(${CGoGN_ROOT_DIR}/windows_dependencies/lib/ ${boost_path}/lib)
add_subdirectory(Release)
add_subdirectory(${CGoGN_ROOT_DIR}/Apps Apps)
if (EXISTS "${CGoGN_ROOT_DIR}/Perso")
......
......@@ -1096,7 +1096,7 @@ bool MeshTablesSurface<PFP>::importASSIMP(const std::string& filename, std::vect
template<typename PFP>
bool MeshTablesSurface<PFP>::mergeCloseVertices()
{
const unsigned int NBV=64; // seems to be good
const int NBV=64; // seems to be good
const int NEIGH[27]={
-NBV*NBV - NBV - 1, -NBV*NBV - NBV, -NBV*NBV - NBV + 1,
......
......@@ -25,6 +25,9 @@
#include "Algo/Geometry/centroid.h"
#include "Topology/generic/autoAttributeHandler.h"
#define _USE_MATH_DEFINES
#include <math.h>
namespace CGoGN
{
......
......@@ -51,8 +51,7 @@ protected:
*/
static const unsigned int nb_segments = 64;
static const float ring_half_width = 0.08f;
static const float ring_half_width;
/**
* locking table
......
......@@ -28,17 +28,17 @@
#include "Geometry/intersection.h"
#include <glm/ext.hpp>
//#include <glm/gtc/matrix_transform.hpp>
//#include "glm/gtc/type_precision.hpp"
//#include "glm/gtc/type_ptr.hpp"
//#include <cmath>
#define _USE_MATH_DEFINES
#include <math.h>
namespace CGoGN
{
namespace Utils
{
const float FrameManipulator::ring_half_width = 0.08f;
FrameManipulator::FrameManipulator():
m_highlighted(NONE),
......@@ -900,7 +900,7 @@ void FrameManipulator::rotateInScreen(int dx, int dy)
Geom::Vec3f axisRotation(P[0]-m_trans[0], P[1]-m_trans[1], P[2]-m_trans[2]);
axisRotation.normalize();
glm::mat4 tr = glm::rotate(glm::mat4(1.0f),float(sqrt(dx*dx+dy*dy))/2.0f,glm::vec3(axisRotation[0],axisRotation[1],axisRotation[2]));
glm::mat4 tr = glm::rotate(glm::mat4(1.0f),sqrt(float(dx*dx+dy*dy))/2.0f,glm::vec3(axisRotation[0],axisRotation[1],axisRotation[2]));
m_rotations = tr*m_rotations;
}
......
......@@ -26,8 +26,9 @@
#include "glm/gtc/matrix_transform.hpp"
#include "Geometry/distances.h"
#include "Geometry/intersection.h"
#include <cmath>
#include <algorithm>
#define _USE_MATH_DEFINES
#include <math.h>
namespace CGoGN
{
......@@ -915,7 +916,7 @@ void IcoSphere::changeTopo(unsigned int sub)
{
if (sub<2)
sub=2;
int subd = int(log(sub/2)/log(2.0))-1;
int subd = int(log(0.5*sub)/log(2.0))-1;
if (subd<0)
subd=0;
......@@ -929,7 +930,7 @@ void IcoSphere::changeTopoSubdivision(unsigned int sub)
m_sub = sub;
unsigned int subEdge = powf(2.0f,4.0f-sub);
unsigned int subEdge = (unsigned int)(powf(2.0f,4.0f-sub));
std::vector<Geom::Vec3f> points;
points.reserve(10000);
......
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