Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
C-Fu
OpenGL
Commits
121f5c47
Commit
121f5c47
authored
Jan 26, 2017
by
Anakin
Browse files
fixed some warnings
parent
fe374cb8
Changes
2
Hide whitespace changes
Inline
Side-by-side
QtMeshViewer/Source/GeometryEngine.cpp
View file @
121f5c47
...
...
@@ -104,7 +104,7 @@ void GeometryEngine::loadFile(QString filePath)
vertexData
+=
segmentIterator
->
vertices
;
indexData
+=
segmentIterator
->
indices
;
if
(
segmentIterator
->
textureIndex
<
m_materials
->
size
()
&&
m_materials
->
at
(
segmentIterator
->
textureIndex
).
transparent
)
if
(
segmentIterator
->
textureIndex
<
(
unsigned
)
m_materials
->
size
()
&&
m_materials
->
at
(
segmentIterator
->
textureIndex
).
transparent
)
m_drawList
.
push_back
(
new_info
);
else
m_drawList
.
push_front
(
new_info
);
...
...
@@ -184,11 +184,11 @@ void GeometryEngine::drawGeometry(QOpenGLShaderProgram *program, bool wireframe)
{
bool
tmp_transparent
(
false
);
bool
tmp_specular
(
false
);
float
shininess
;
float
shininess
(
0.0
)
;
QVector3D
specularColor
;
// bind the correct texture
if
(
it
.
textureIndex
<
m_materials
->
size
()
&&
m_materials
->
at
(
it
.
textureIndex
).
texture0
!=
Q_NULLPTR
)
if
(
it
.
textureIndex
<
(
unsigned
)
m_materials
->
size
()
&&
m_materials
->
at
(
it
.
textureIndex
).
texture0
!=
Q_NULLPTR
)
{
m_materials
->
at
(
it
.
textureIndex
).
texture0
->
bind
();
tmp_transparent
=
m_materials
->
at
(
it
.
textureIndex
).
transparent
;
...
...
QtMeshViewer/Source/MshFile.cpp
View file @
121f5c47
...
...
@@ -504,7 +504,7 @@ void MshFile::analyseSegmChunks(Model * dataDestination, std::list<ChunkHeader*>
m_file
.
seekg
(
it
->
position
);
m_file
.
read
(
F2V
(
tmp_size
),
sizeof
(
tmp_size
));
if
(
tmp_size
<
new_segment
->
vertices
.
size
())
if
(
tmp_size
<
(
unsigned
)
new_segment
->
vertices
.
size
())
{
emit
sendMessage
(
"WARNING: too less normals "
+
QString
::
number
(
tmp_size
)
+
" < "
+
QString
::
number
(
new_segment
->
vertices
.
size
()),
1
);
...
...
@@ -512,7 +512,7 @@ void MshFile::analyseSegmChunks(Model * dataDestination, std::list<ChunkHeader*>
for
(
unsigned
int
j
=
0
;
j
<
3
;
j
++
)
new_segment
->
vertices
[
i
-
1
].
vertexNormal
[
j
]
=
0
;
}
else
if
(
tmp_size
>
new_segment
->
vertices
.
size
())
else
if
(
tmp_size
>
(
unsigned
)
new_segment
->
vertices
.
size
())
{
emit
sendMessage
(
"WARNING: too many normals "
+
QString
::
number
(
tmp_size
)
+
" > "
+
QString
::
number
(
new_segment
->
vertices
.
size
()),
1
);
tmp_size
=
new_segment
->
vertices
.
size
();
...
...
@@ -696,7 +696,7 @@ void MshFile::readUV(Segment * dataDestination, std::streampos position)
m_file
.
seekg
(
position
);
m_file
.
read
(
F2V
(
tmp_size
),
sizeof
(
tmp_size
));
if
(
tmp_size
<
dataDestination
->
vertices
.
size
())
if
(
tmp_size
<
(
unsigned
)
dataDestination
->
vertices
.
size
())
{
emit
sendMessage
(
"WARNING: too less UVs "
+
QString
::
number
(
tmp_size
)
+
" < "
+
QString
::
number
(
dataDestination
->
vertices
.
size
()),
1
);
...
...
@@ -704,7 +704,7 @@ void MshFile::readUV(Segment * dataDestination, std::streampos position)
for
(
unsigned
int
j
=
0
;
j
<
2
;
j
++
)
dataDestination
->
vertices
[
i
-
1
].
texCoord
[
j
]
=
0
;
}
else
if
(
tmp_size
>
dataDestination
->
vertices
.
size
())
else
if
(
tmp_size
>
(
unsigned
)
dataDestination
->
vertices
.
size
())
{
emit
sendMessage
(
"WARNING: too many UVs "
+
QString
::
number
(
tmp_size
)
+
" > "
+
QString
::
number
(
dataDestination
->
vertices
.
size
()),
1
);
tmp_size
=
dataDestination
->
vertices
.
size
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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