Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OpenGL
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
C-Fu
OpenGL
Commits
0f379ba0
You need to sign in or sign up before continuing.
Commit
0f379ba0
authored
Nov 13, 2016
by
Anakin
Browse files
Options
Downloads
Patches
Plain Diff
ignore null, bones, shadow mesh and hidden things
parent
8929717c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
MshViewer/Source/OpenGlController.cpp
+14
-0
14 additions, 0 deletions
MshViewer/Source/OpenGlController.cpp
with
14 additions
and
0 deletions
MshViewer/Source/OpenGlController.cpp
+
14
−
0
View file @
0f379ba0
...
@@ -306,6 +306,13 @@ void OpenGLController::updateScene()
...
@@ -306,6 +306,13 @@ void OpenGLController::updateScene()
for
(
unsigned
int
modelIndex
=
0
;
modelIndex
<
vModels
.
size
();
modelIndex
++
)
for
(
unsigned
int
modelIndex
=
0
;
modelIndex
<
vModels
.
size
();
modelIndex
++
)
{
{
// skip null, bones, shadowMesh, hidden things (don't increase textrue index!!)
if
(
vModels
[
modelIndex
]
->
type
==
null
||
vModels
[
modelIndex
]
->
type
==
bone
||
vModels
[
modelIndex
]
->
type
==
shadowMesh
||
vModels
[
modelIndex
]
->
renderFlags
==
1
)
continue
;
for
(
auto
&
segIt
:
vModels
[
modelIndex
]
->
segmLst
)
for
(
auto
&
segIt
:
vModels
[
modelIndex
]
->
segmLst
)
{
{
// give texture to the shader
// give texture to the shader
...
@@ -360,6 +367,10 @@ void OpenGLController::loadMsh(const char * path)
...
@@ -360,6 +367,10 @@ void OpenGLController::loadMsh(const char * path)
for
(
auto
&
modIt
:
vModels
)
for
(
auto
&
modIt
:
vModels
)
{
{
// don't draw bones, nulls, shadow mesh and hidden things
if
(
modIt
->
type
==
null
||
modIt
->
type
==
bone
||
modIt
->
type
==
shadowMesh
||
modIt
->
renderFlags
==
1
)
continue
;
for
(
auto
&
segIt
:
modIt
->
segmLst
)
for
(
auto
&
segIt
:
modIt
->
segmLst
)
{
{
for
(
unsigned
int
i
=
0
;
i
<
segIt
->
meshSize
;
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
segIt
->
meshSize
;
i
++
)
...
@@ -399,6 +410,9 @@ void OpenGLController::loadMsh(const char * path)
...
@@ -399,6 +410,9 @@ void OpenGLController::loadMsh(const char * path)
// get textures
// get textures
for
(
auto
&
modIt
:
vModels
)
for
(
auto
&
modIt
:
vModels
)
{
{
// we don't need textures from null, bones, shadowMesh and hidden things, since they are not displayed
if
(
modIt
->
type
==
null
||
modIt
->
type
==
bone
||
modIt
->
type
==
shadowMesh
||
modIt
->
renderFlags
==
1
)
continue
;
for
(
auto
&
segIt
:
modIt
->
segmLst
)
for
(
auto
&
segIt
:
modIt
->
segmLst
)
{
{
textureData
*
tempData
=
new
textureData
;
textureData
*
tempData
=
new
textureData
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment