Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
5f7268a1
Commit
5f7268a1
authored
Apr 17, 2015
by
unknown
Committed by
jean-pierre charras
Apr 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3d-viewer, fix again a transparency issue.
parent
dcdf9066
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
19 deletions
+18
-19
3d_draw.cpp
3d-viewer/3d_draw.cpp
+2
-1
3d_frame.cpp
3d-viewer/3d_frame.cpp
+2
-2
3d_mesh_model.cpp
3d-viewer/3d_mesh_model.cpp
+14
-16
No files found.
3d-viewer/3d_draw.cpp
View file @
5f7268a1
...
...
@@ -118,7 +118,7 @@ void EDA_3D_CANVAS::create_and_render_shadow_buffer( GLuint *aDst_gl_texture,
// Render body and shapes
if
(
aDraw_body
&&
m_glLists
[
GL_ID_BODY
]
)
glCallList
(
m_glLists
[
GL_ID_BODY
]
);
glCallList
(
m_glLists
[
GL_ID_BODY
]
);
if
(
m_glLists
[
GL_ID_3DSHAPES_SOLID_FRONT
]
)
glCallList
(
m_glLists
[
GL_ID_3DSHAPES_SOLID_FRONT
]
);
...
...
@@ -587,6 +587,7 @@ void EDA_3D_CANVAS::Redraw()
if
(
isEnabled
(
FL_MODULE
)
&&
m_glLists
[
GL_ID_3DSHAPES_TRANSP_FRONT
]
)
{
glEnable
(
GL_COLOR_MATERIAL
);
SetOpenGlDefaultMaterial
();
glEnable
(
GL_BLEND
);
glBlendFunc
(
GL_SRC_ALPHA
,
GL_ONE_MINUS_SRC_ALPHA
);
glCallList
(
m_glLists
[
GL_ID_3DSHAPES_TRANSP_FRONT
]
);
...
...
3d-viewer/3d_frame.cpp
View file @
5f7268a1
...
...
@@ -260,7 +260,7 @@ void EDA_3D_FRAME::LoadSettings( wxConfigBase* aCfg )
aCfg
->
Read
(
keyRenderShowModelBBox
,
&
tmp
,
false
);
prms
.
SetFlag
(
FL_RENDER_SHOW_MODEL_BBOX
,
tmp
);
aCfg
->
Read
(
keyShowAxis
,
&
tmp
,
true
);
prms
.
SetFlag
(
FL_AXIS
,
tmp
);
...
...
@@ -324,7 +324,7 @@ void EDA_3D_FRAME::SaveSettings( wxConfigBase* aCfg )
aCfg
->
Write
(
keyRenderUseModelNormals
,
prms
.
GetFlag
(
FL_RENDER_USE_MODEL_NORMALS
)
);
aCfg
->
Write
(
keyRenderMaterial
,
prms
.
GetFlag
(
FL_RENDER_MATERIAL
)
);
aCfg
->
Write
(
keyRenderShowModelBBox
,
prms
.
GetFlag
(
FL_RENDER_SHOW_MODEL_BBOX
)
);
aCfg
->
Write
(
keyShowAxis
,
prms
.
GetFlag
(
FL_AXIS
)
);
aCfg
->
Write
(
keyShowGrid
,
prms
.
GetFlag
(
FL_GRID
)
);
aCfg
->
Write
(
keyShowGridSize
,
prms
.
m_3D_Grid
);
...
...
3d-viewer/3d_mesh_model.cpp
View file @
5f7268a1
...
...
@@ -188,6 +188,7 @@ void S3D_MESH::openGL_Render( bool aIsRenderingJustNonTransparentObjects,
printf("m_MaterialIndexPerVertex.size() %lu\n", m_MaterialIndexPerVertex.size() );
printf("m_PerVertexNormalsNormalized.size() %lu\n", m_PerVertexNormalsNormalized.size() );
printf("m_PerFaceVertexNormals.size() %lu\n", m_PerFaceVertexNormals.size() );
printf("m_PerFaceNormalsNormalized.size() %lu\n", m_PerFaceNormalsNormalized.size() );
printf("smoothShapes %d\n", smoothShapes );
...
...
@@ -209,26 +210,23 @@ void S3D_MESH::openGL_Render( bool aIsRenderingJustNonTransparentObjects,
if
(
m_Materials
)
{
if
(
m_Materials
->
m_ColorPerVertex
==
false
)
{
bool
isTransparent
=
m_Materials
->
SetOpenGLMaterial
(
0
,
useMaterial
);
bool
isTransparent
=
m_Materials
->
SetOpenGLMaterial
(
0
,
useMaterial
);
if
(
isTransparent
&&
aIsRenderingJustNonTransparentObjects
)
return
;
if
(
isTransparent
&&
aIsRenderingJustNonTransparentObjects
)
return
;
if
(
!
isTransparent
&&
aIsRenderingJustTransparentObjects
)
return
;
if
(
!
isTransparent
&&
aIsRenderingJustTransparentObjects
)
return
;
// Skip total transparent models
if
(
useMaterial
)
if
(
m_Materials
->
m_Transparency
.
size
()
>
0
)
{
lastTransparency_value
=
m_Materials
->
m_Transparency
[
0
];
// Skip total transparent models
if
(
useMaterial
)
if
(
m_Materials
->
m_Transparency
.
size
()
>
0
)
{
lastTransparency_value
=
m_Materials
->
m_Transparency
[
0
];
if
(
lastTransparency_value
>=
1.0
f
)
return
;
}
}
if
(
lastTransparency_value
>=
1.0
f
)
return
;
}
}
glPushMatrix
();
...
...
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