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
96379a9a
Commit
96379a9a
authored
Dec 13, 2016
by
Anakin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed texture error
parent
481256e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
MeshViewerQt/Source/OpenGlViewer.cpp
MeshViewerQt/Source/OpenGlViewer.cpp
+10
-1
MeshViewerQt/main.cpp
MeshViewerQt/main.cpp
+1
-0
No files found.
MeshViewerQt/Source/OpenGlViewer.cpp
View file @
96379a9a
...
@@ -132,7 +132,16 @@ void OpenGlViewer::paintGL()
...
@@ -132,7 +132,16 @@ void OpenGlViewer::paintGL()
{
{
// set the texture
// set the texture
std
::
uint32_t
tmp_textureIndex
=
segmentIterator
->
textureIndex
>=
m_vTextures
->
size
()
?
m_vTextures
->
size
()
-
1
:
segmentIterator
->
textureIndex
;
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
// give the MVP to the shader
m_program
->
setUniformValue
(
m_uniformMVP
,
getMVPMatrix
(
modelIndex
));
m_program
->
setUniformValue
(
m_uniformMVP
,
getMVPMatrix
(
modelIndex
));
...
...
MeshViewerQt/main.cpp
View file @
96379a9a
#include "Header\MainWindow.h"
#include "Header\MainWindow.h"
#include <QtWidgets/QApplication>
#include <QtWidgets/QApplication>
int
startGUI
(
int
argc
,
char
*
argv
[])
int
startGUI
(
int
argc
,
char
*
argv
[])
{
{
QApplication
a
(
argc
,
argv
);
QApplication
a
(
argc
,
argv
);
...
...
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