Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
C-Fu
OpenGL
Commits
96379a9a
Commit
96379a9a
authored
Dec 13, 2016
by
Anakin
Browse files
fixed texture error
parent
481256e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
MeshViewerQt/Source/OpenGlViewer.cpp
View file @
96379a9a
...
...
@@ -132,7 +132,16 @@ void OpenGlViewer::paintGL()
{
// set the texture
std
::
uint32_t
tmp_textureIndex
=
segmentIterator
->
textureIndex
>=
m_vTextures
->
size
()
?
m_vTextures
->
size
()
-
1
:
segmentIterator
->
textureIndex
;
m_oglTexture
->
setData
(
*
m_vTextures
->
at
(
tmp_textureIndex
));
if
(
m_oglTexture
->
isCreated
())
{
m_oglTexture
->
destroy
();
m_oglTexture
->
create
();
m_oglTexture
->
setSize
(
m_vTextures
->
at
(
tmp_textureIndex
)
->
width
(),
m_vTextures
->
at
(
tmp_textureIndex
)
->
height
());
m_oglTexture
->
setData
(
*
m_vTextures
->
at
(
tmp_textureIndex
));
}
// give the MVP to the shader
m_program
->
setUniformValue
(
m_uniformMVP
,
getMVPMatrix
(
modelIndex
));
...
...
MeshViewerQt/main.cpp
View file @
96379a9a
#include
"Header\MainWindow.h"
#include
<QtWidgets/QApplication>
int
startGUI
(
int
argc
,
char
*
argv
[])
{
QApplication
a
(
argc
,
argv
);
...
...
Write
Preview
Supports
Markdown
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