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
89be3271
Commit
89be3271
authored
Mar 18, 2014
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3D viewer: fix 3D grid artifact ( bug 1293873 )
parent
b4369243
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
+15
-11
3d_draw.cpp
3d-viewer/3d_draw.cpp
+15
-11
No files found.
3d-viewer/3d_draw.cpp
View file @
89be3271
...
...
@@ -52,7 +52,8 @@
// Imported function:
extern
void
CheckGLError
();
/* returns true if aLayer should be displayed, false otherwise
/* Helper function
* returns true if aLayer should be displayed, false otherwise
*/
static
bool
Is3DLayerEnabled
(
LAYER_NUM
aLayer
);
...
...
@@ -144,7 +145,8 @@ void EDA_3D_CANVAS::Redraw()
-
g_Parm_3D_Visu
.
m_BoardPos
.
y
*
g_Parm_3D_Visu
.
m_BiuTo3Dunits
,
0.0
F
);
// draw all objects in lists
// transparent objects should be drawn after opaque objects
glCallList
(
m_glLists
[
GL_ID_BOARD
]
);
glCallList
(
m_glLists
[
GL_ID_TECH_LAYERS
]
);
...
...
@@ -156,21 +158,23 @@ void EDA_3D_CANVAS::Redraw()
glCallList
(
m_glLists
[
GL_ID_AUX_LAYERS
]
);
}
if
(
g_Parm_3D_Visu
.
GetFlag
(
FL_GRID
)
&&
m_glLists
[
GL_ID_GRID
]
)
glCallList
(
m_glLists
[
GL_ID_GRID
]
);
if
(
g_Parm_3D_Visu
.
GetFlag
(
FL_MODULE
)
)
{
if
(
!
m_glLists
[
GL_ID_3DSHAPES_SOLID
]
)
CreateDrawGL_List
();
glCallList
(
m_glLists
[
GL_ID_3DSHAPES_SOLID
]
);
}
// This list must be drawn last, because it contains the
// transparent gl objects, which should be drawn after all
// non tyransparent objects
// Grid uses transparency: draw it after all objects
if
(
g_Parm_3D_Visu
.
GetFlag
(
FL_GRID
)
&&
m_glLists
[
GL_ID_GRID
]
)
glCallList
(
m_glLists
[
GL_ID_GRID
]
);
// This list must be drawn last, because it contains the
// transparent gl objects, which should be drawn after all
// non transparent objects
if
(
g_Parm_3D_Visu
.
GetFlag
(
FL_MODULE
)
&&
m_glLists
[
GL_ID_3DSHAPES_TRANSP
]
)
glCallList
(
m_glLists
[
GL_ID_3DSHAPES_TRANSP
]
);
}
SwapBuffers
();
}
...
...
@@ -913,8 +917,8 @@ void EDA_3D_CANVAS::Draw3DGrid( double aGriSizeMM )
double
zpos
=
0.0
;
EDA_COLOR_T
gridcolor
=
DARKGRAY
;
// Color of grid lines
EDA_COLOR_T
gridcolor_marker
=
LIGHTGRAY
;
// Color of grid lines every 5 lines
double
scale
=
g_Parm_3D_Visu
.
m_BiuTo3Dunits
;
double
transparency
=
0.4
;
const
double
scale
=
g_Parm_3D_Visu
.
m_BiuTo3Dunits
;
const
double
transparency
=
0.3
;
glNormal3f
(
0.0
,
0.0
,
1.0
);
...
...
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