Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
OpenGL
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
C-Fu
OpenGL
Commits
e963b753
Commit
e963b753
authored
Jan 05, 2017
by
Anakin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed texture problem
parent
b58b7c47
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
QtMeshViewer/Source/GeometryEngine.cpp
QtMeshViewer/Source/GeometryEngine.cpp
+3
-1
QtMeshViewer/Source/MainWindow.cpp
QtMeshViewer/Source/MainWindow.cpp
+1
-1
No files found.
QtMeshViewer/Source/GeometryEngine.cpp
View file @
e963b753
...
...
@@ -107,6 +107,7 @@ void GeometryEngine::loadFile(const char* filePath)
}
catch
(
std
::
invalid_argument
e
)
{
clearData
();
emit
sendMessage
(
QString
(
e
.
what
()),
2
);
}
}
...
...
@@ -126,7 +127,7 @@ void GeometryEngine::loadTexture(const char* filePath, const char* fileName)
img
=
loadTga
((
std
::
string
(
filePath
)
+
std
::
string
(
fileName
)).
c_str
(),
loadSuccess
);
//TODO: emit if not successfull
if
(
loadSuccess
)
if
(
!
loadSuccess
)
{
QString
msg
=
"WARNING: texture not found or corrupted: "
;
msg
+=
QString
(
fileName
);
...
...
@@ -205,6 +206,7 @@ void GeometryEngine::drawGeometry(QOpenGLShaderProgram *program)
for
(
auto
&
it
:
m_drawList
)
{
Q_ASSERT
(
!
m_textures
.
isEmpty
());
// bind the correct texture
if
(
it
.
textureIndex
<
m_textures
.
size
())
m_textures
.
at
(
it
.
textureIndex
)
->
bind
();
...
...
QtMeshViewer/Source/MainWindow.cpp
View file @
e963b753
...
...
@@ -122,7 +122,7 @@ void MainWindow::aboutTool()
void
MainWindow
::
printMessage
(
QString
message
,
int
severity
)
{
if
(
severity
<
m_curSeverity
)
if
(
!
ui
->
statusBar
->
currentMessage
().
isEmpty
()
&&
severity
<
m_curSeverity
)
return
;
m_curSeverity
=
severity
;
...
...
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