Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
David Cazier
CGoGN
Commits
27f5e30d
Commit
27f5e30d
authored
Feb 20, 2015
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compile QGLViewer even on windows
parent
b83db656
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
25 additions
and
18 deletions
+25
-18
ThirdParty/libQGLViewer/QGLViewer/CMakeLists.txt
ThirdParty/libQGLViewer/QGLViewer/CMakeLists.txt
+12
-5
ThirdParty/libQGLViewer/QGLViewer/VRender/BSPSortMethod.cpp
ThirdParty/libQGLViewer/QGLViewer/VRender/BSPSortMethod.cpp
+4
-4
ThirdParty/libQGLViewer/QGLViewer/VRender/EPSExporter.cpp
ThirdParty/libQGLViewer/QGLViewer/VRender/EPSExporter.cpp
+1
-1
ThirdParty/libQGLViewer/QGLViewer/VRender/Exporter.cpp
ThirdParty/libQGLViewer/QGLViewer/VRender/Exporter.cpp
+1
-1
ThirdParty/libQGLViewer/QGLViewer/VRender/FIGExporter.cpp
ThirdParty/libQGLViewer/QGLViewer/VRender/FIGExporter.cpp
+1
-1
ThirdParty/libQGLViewer/QGLViewer/VRender/ParserGL.cpp
ThirdParty/libQGLViewer/QGLViewer/VRender/ParserGL.cpp
+2
-2
ThirdParty/libQGLViewer/QGLViewer/VRender/PrimitivePositioning.cpp
...y/libQGLViewer/QGLViewer/VRender/PrimitivePositioning.cpp
+1
-1
ThirdParty/libQGLViewer/QGLViewer/VRender/VisibilityOptimizer.cpp
...ty/libQGLViewer/QGLViewer/VRender/VisibilityOptimizer.cpp
+3
-3
No files found.
ThirdParty/libQGLViewer/QGLViewer/CMakeLists.txt
View file @
27f5e30d
...
...
@@ -90,13 +90,20 @@ set(FORM_FILES_GROUP "Generated")
include_directories
(
".."
)
# The code must be relocatable if we want to link a shared library against it
#if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# add_definitions("-fPIC")
#endif()
if
(
WIN32
)
ADD_DEFINITIONS
(
-DCREATE_QGLVIEWER_DLL -DNOMINMAX
)
else
()
ADD_DEFINITIONS
(
"-fPIC"
)
endif
()
add_library
(
QGLViewer SHARED
${
HEADER_FILES
}
${
MOC_FILES
}
${
MOC_UI_FILES
}
${
FORM_FILES
}
${
SOURCE_FILES
}
)
target_link_libraries
(
QGLViewer
${
QT_LIBRARIES
}
${
OPENGL_LIBRARY
}
)
# The code must be relocatable if we want to link a shared library against it
if
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
STREQUAL
"GNU"
OR
"
${
CMAKE_CXX_COMPILER_ID
}
"
STREQUAL
"Clang"
)
add_definitions
(
"-fPIC"
)
endif
()
ThirdParty/libQGLViewer/QGLViewer/VRender/BSPSortMethod.cpp
View file @
27f5e30d
...
...
@@ -81,7 +81,7 @@ void BSPSortMethod::sortPrimitives(std::vector<PtrPrimitive>& primitive_tab,VRen
BSPTree
tree
;
Polygone
*
P
;
unsigned
int
N
=
primitive_tab
.
size
()
/
200
+
1
;
unsigned
int
N
=
(
unsigned
int
)(
primitive_tab
.
size
()
/
200
+
1
)
;
int
nbinserted
=
0
;
vector
<
PtrPrimitive
>
segments_and_points
;
// Store segments and points for pass 2, because polygons are deleted
...
...
@@ -313,7 +313,7 @@ void BSPNode::Classify(Polygone *P, Polygone * & moins_, Polygone * & plus_)
return
;
}
int
n
=
P
->
nbVertices
(
);
int
n
=
int
(
P
->
nbVertices
()
);
int
Smin
=
1
;
int
Smax
=
-
1
;
...
...
@@ -596,13 +596,13 @@ void BSPNode::initEquation(const Polygone *P,double & a, double & b, double & c,
if
(
n
.
infNorm
()
<=
0.00001
)
{
unsigned
int
ind
=
P
->
nbVertices
(
);
unsigned
int
ind
=
(
unsigned
int
)(
P
->
nbVertices
()
);
for
(
unsigned
int
i
=
0
;
i
<
P
->
nbVertices
();
i
++
)
if
((
P
->
vertex
(
i
+
1
)
-
P
->
vertex
(
i
)).
infNorm
()
>
0.00001
)
{
ind
=
i
;
i
=
P
->
nbVertices
(
);
i
=
(
unsigned
int
)(
P
->
nbVertices
()
);
}
if
(
ind
<
P
->
nbVertices
())
// the polygon is a true segment
...
...
ThirdParty/libQGLViewer/QGLViewer/VRender/EPSExporter.cpp
View file @
27f5e30d
...
...
@@ -155,7 +155,7 @@ void EPSExporter::spewPolygone(const Polygone *P, QTextStream& out)
GLfloat
red
,
green
,
blue
;
bool
smooth
;
nvertices
=
P
->
nbVertices
(
)
;
nvertices
=
int
(
P
->
nbVertices
()
)
;
const
Feedback3DColor
&
vertex
=
Feedback3DColor
(
P
->
sommet3DColor
(
0
))
;
...
...
ThirdParty/libQGLViewer/QGLViewer/VRender/Exporter.cpp
View file @
27f5e30d
...
...
@@ -73,7 +73,7 @@ void Exporter::exportToFile(const QString& filename,
writeHeader
(
out
)
;
unsigned
int
N
=
primitive_tab
.
size
()
/
200
+
1
;
unsigned
int
N
=
(
unsigned
int
)(
primitive_tab
.
size
()
/
200
+
1
)
;
for
(
unsigned
int
i
=
0
;
i
<
primitive_tab
.
size
();
++
i
)
{
...
...
ThirdParty/libQGLViewer/QGLViewer/VRender/FIGExporter.cpp
View file @
27f5e30d
...
...
@@ -181,7 +181,7 @@ void FIGExporter::spewPolygone(const Polygone *P, QTextStream& out)
int
nvertices
;
GLfloat
red
,
green
,
blue
;
nvertices
=
P
->
nbVertices
(
)
;
nvertices
=
int
(
P
->
nbVertices
()
)
;
Feedback3DColor
vertex
(
P
->
sommet3DColor
(
0
))
;
...
...
ThirdParty/libQGLViewer/QGLViewer/VRender/ParserGL.cpp
View file @
27f5e30d
...
...
@@ -306,7 +306,7 @@ void ParserUtils::NormalizePrimitiveCoordinates(GLfloat * & loc,GLfloat MaxSize,
token
=
int
(
*
loc
)
;
loc
++
;
int
size
=
Feedback3DColor
::
sizeInBuffer
(
)
;
int
size
=
int
(
Feedback3DColor
::
sizeInBuffer
()
)
;
switch
(
token
)
{
...
...
@@ -353,7 +353,7 @@ void ParserUtils::ComputePrimitiveBB(GLfloat * & loc,GLfloat & xmin,GLfloat & xm
token
=
int
(
*
loc
)
;
loc
++
;
int
size
=
Feedback3DColor
::
sizeInBuffer
(
)
;
int
size
=
int
(
Feedback3DColor
::
sizeInBuffer
()
)
;
switch
(
token
)
{
...
...
ThirdParty/libQGLViewer/QGLViewer/VRender/PrimitivePositioning.cpp
View file @
27f5e30d
...
...
@@ -404,7 +404,7 @@ gpc_polygon PrimitivePositioning::createGPCPolygon_XY(const Polygone *P)
gpc_vertex_list
*
gpc_p_verts
=
new
gpc_vertex_list
;
gpc_p_verts
->
num_vertices
=
P
->
nbVertices
(
)
;
gpc_p_verts
->
num_vertices
=
long
(
P
->
nbVertices
()
)
;
gpc_p_verts
->
vertex
=
new
gpc_vertex
[
P
->
nbVertices
()]
;
for
(
size_t
i
=
0
;
i
<
P
->
nbVertices
();
++
i
)
...
...
ThirdParty/libQGLViewer/QGLViewer/VRender/VisibilityOptimizer.cpp
View file @
27f5e30d
...
...
@@ -61,7 +61,7 @@ void VisibilityOptimizer::optimize(vector<PtrPrimitive>& primitives,VRenderParam
#ifdef DEBUG_VO
cout
<<
"Optimizing visibility."
<<
endl
;
#endif
unsigned
long
N
=
primitives
.
size
()
/
200
+
1
;
unsigned
long
N
=
(
unsigned
long
)(
primitives
.
size
()
/
200
+
1
)
;
#ifdef DEBUG_EPSRENDER__SHOW1
// cout << "Showing viewer." << endl ;
...
...
@@ -178,7 +178,7 @@ void VisibilityOptimizer::optimize(vector<PtrPrimitive>& primitives,VRenderParam
}
else
{
new_poly_verts
->
num_vertices
=
p
->
nbVertices
(
)
;
new_poly_verts
->
num_vertices
=
long
(
p
->
nbVertices
()
)
;
new_poly_verts
->
vertex
=
new
gpc_vertex
[
p
->
nbVertices
()]
;
for
(
size_t
i
=
0
;
i
<
p
->
nbVertices
();
++
i
)
...
...
@@ -191,7 +191,7 @@ void VisibilityOptimizer::optimize(vector<PtrPrimitive>& primitives,VRenderParam
mx
/=
p
->
nbVertices
()
;
my
/=
p
->
nbVertices
()
;
new_poly_reduced_verts
->
num_vertices
=
p
->
nbVertices
(
)
;
new_poly_reduced_verts
->
num_vertices
=
long
(
p
->
nbVertices
()
)
;
new_poly_reduced_verts
->
vertex
=
new
gpc_vertex
[
p
->
nbVertices
()]
;
for
(
size_t
j
=
0
;
j
<
p
->
nbVertices
();
++
j
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment