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
f9d74ccb
Commit
f9d74ccb
authored
Jul 29, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed shaderless OpenGL backend.
parent
bd182aad
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
132 additions
and
372 deletions
+132
-372
drawpanel_gal.cpp
common/drawpanel_gal.cpp
+4
-8
opengl_gal.cpp
common/gal/opengl/opengl_gal.cpp
+122
-334
class_drawpanel_gal.h
include/class_drawpanel_gal.h
+2
-3
opengl_gal.h
include/gal/opengl/opengl_gal.h
+1
-7
hotkeys.cpp
pcbnew/hotkeys.cpp
+2
-4
hotkeys.h
pcbnew/hotkeys.h
+0
-1
menubar_pcbframe.cpp
pcbnew/menubar_pcbframe.cpp
+0
-7
pcbframe.cpp
pcbnew/pcbframe.cpp
+1
-7
pcbnew_id.h
pcbnew/pcbnew_id.h
+0
-1
No files found.
common/drawpanel_gal.cpp
View file @
f9d74ccb
...
...
@@ -55,7 +55,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin
m_view
=
NULL
;
m_painter
=
NULL
;
SwitchBackend
(
aGalType
,
true
);
SwitchBackend
(
aGalType
);
SetBackgroundStyle
(
wxBG_STYLE_CUSTOM
);
// Initial display settings
...
...
@@ -149,13 +149,10 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect )
}
void
EDA_DRAW_PANEL_GAL
::
SwitchBackend
(
GalType
aGalType
,
bool
aUseShaders
)
void
EDA_DRAW_PANEL_GAL
::
SwitchBackend
(
GalType
aGalType
)
{
wxLogDebug
(
wxT
(
"EDA_DRAW_PANEL_GAL::SwitchBackend: using shaders: %s"
),
aUseShaders
?
"true"
:
"false"
);
// Do not do anything if the currently used GAL is correct
if
(
aGalType
==
m_currentGal
&&
aUseShaders
==
m_useShaders
&&
m_gal
!=
NULL
)
if
(
aGalType
==
m_currentGal
&&
m_gal
!=
NULL
)
return
;
delete
m_gal
;
...
...
@@ -163,7 +160,7 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders )
switch
(
aGalType
)
{
case
GAL_TYPE_OPENGL
:
m_gal
=
new
KiGfx
::
OPENGL_GAL
(
this
,
this
,
this
,
aUseShaders
);
m_gal
=
new
KiGfx
::
OPENGL_GAL
(
this
,
this
,
this
);
break
;
case
GAL_TYPE_CAIRO
:
...
...
@@ -191,5 +188,4 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders )
m_gal
->
ResizeScreen
(
size
.
GetX
(),
size
.
GetY
()
);
m_currentGal
=
aGalType
;
m_useShaders
=
aUseShaders
;
}
common/gal/opengl/opengl_gal.cpp
View file @
f9d74ccb
This diff is collapsed.
Click to expand it.
include/class_drawpanel_gal.h
View file @
f9d74ccb
...
...
@@ -64,7 +64,7 @@ public:
* Switches method of rendering graphics.
* @param aGalType is a type of rendering engine that you want to use.
*/
void
SwitchBackend
(
GalType
aGalType
,
bool
aUseShaders
=
false
);
void
SwitchBackend
(
GalType
aGalType
);
/**
* Function GetGAL
...
...
@@ -89,8 +89,7 @@ protected:
///< using GAL
KiGfx
::
WX_VIEW_CONTROLS
*
m_viewControls
;
///< Control for VIEW (moving, zooming, etc.)
GalType
m_currentGal
;
///< Currently used GAL
bool
m_useShaders
;
///< Are shaders used? (only for OpenGL GAL)
wxLongLong
m_timeStamp
;
wxLongLong
m_timeStamp
;
///< Timestamp for framelimiter
};
#endif
include/gal/opengl/opengl_gal.h
View file @
f9d74ccb
...
...
@@ -82,14 +82,9 @@ public:
* a wxCommandEvent holding EVT_GAL_REDRAW, as sent by PostPaint().
*
* @param aName is the name of this window for use by wxWindow::FindWindowByName()
*
* @param isUseShaders is a flag, that indicates, if shaders should be used
* for higher quality rendering.
*
*/
OPENGL_GAL
(
wxWindow
*
aParent
,
wxEvtHandler
*
aMouseListener
=
NULL
,
wxEvtHandler
*
aPaintListener
=
NULL
,
bool
isUseShaders
=
false
,
const
wxString
&
aName
=
wxT
(
"GLCanvas"
)
);
wxEvtHandler
*
aPaintListener
=
NULL
,
const
wxString
&
aName
=
wxT
(
"GLCanvas"
)
);
virtual
~
OPENGL_GAL
();
...
...
@@ -366,7 +361,6 @@ private:
bool
isGlewInitialized
;
///< Is GLEW initialized?
bool
isFramebufferInitialized
;
///< Are the framebuffers initialized?
bool
isShaderInitialized
;
///< Was the shader initialized?
bool
isUseShader
;
///< Should the shaders be used?
bool
isGrouping
;
///< Was a group started?
/**
...
...
pcbnew/hotkeys.cpp
View file @
f9d74ccb
...
...
@@ -85,9 +85,7 @@ static EDA_HOTKEY HkSwitchHighContrastMode( wxT("Switch Highcontrast mode"),
static
EDA_HOTKEY
HkCanvasDefault
(
wxT
(
"Switch to default canvas"
),
HK_CANVAS_DEFAULT
,
GR_KB_ALT
+
WXK_F9
);
static
EDA_HOTKEY
HkCanvasOpenGL
(
wxT
(
"Switch to OpenGL canvas"
),
HK_CANVAS_OPENGL
,
GR_KB_ALT
+
WXK_F10
);
static
EDA_HOTKEY
HkCanvasOpenGLShaders
(
wxT
(
"Switch to OpenGL canvas with shaders"
),
HK_CANVAS_OPENGL_SHADERS
,
GR_KB_ALT
+
WXK_F11
);
HK_CANVAS_OPENGL
,
GR_KB_ALT
+
WXK_F11
);
static
EDA_HOTKEY
HkCanvasCairo
(
wxT
(
"Switch to Cairo canvas"
),
HK_CANVAS_CAIRO
,
GR_KB_ALT
+
WXK_F12
);
...
...
@@ -237,7 +235,7 @@ EDA_HOTKEY* board_edit_Hotkey_List[] =
&
HkRecordMacros6
,
&
HkCallMacros6
,
&
HkRecordMacros7
,
&
HkCallMacros7
,
&
HkRecordMacros8
,
&
HkCallMacros8
,
&
HkRecordMacros9
,
&
HkCallMacros9
,
&
HkSwitchHighContrastMode
,
&
HkCanvasDefault
,
&
HkCanvasCairo
,
&
HkCanvasOpenGL
,
&
HkCanvasOpenGLShaders
,
&
HkCanvasDefault
,
&
HkCanvasCairo
,
&
HkCanvasOpenGL
,
NULL
};
...
...
pcbnew/hotkeys.h
View file @
f9d74ccb
...
...
@@ -84,7 +84,6 @@ enum hotkey_id_commnand {
HK_SWITCH_HIGHCONTRAST_MODE
,
HK_CANVAS_DEFAULT
,
HK_CANVAS_OPENGL
,
HK_CANVAS_OPENGL_SHADERS
,
HK_CANVAS_CAIRO
,
};
...
...
pcbnew/menubar_pcbframe.cpp
View file @
f9d74ccb
...
...
@@ -364,13 +364,6 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
AddMenuItem
(
viewMenu
,
ID_MENU_CANVAS_OPENGL
,
text
,
_
(
"Switch the canvas implementation to OpenGL"
),
KiBitmap
(
tools_xpm
)
);
text
=
AddHotkeyName
(
_
(
"&Switch canvas to OpenGL (shaders)"
),
g_Pcbnew_Editor_Hokeys_Descr
,
HK_CANVAS_OPENGL_SHADERS
,
IS_ACCELERATOR
);
AddMenuItem
(
viewMenu
,
ID_MENU_CANVAS_OPENGL_SHADERS
,
text
,
_
(
"Switch the canvas implementation to OpenGL that uses shaders"
),
KiBitmap
(
tools_xpm
)
);
text
=
AddHotkeyName
(
_
(
"&Switch canvas to Cairo"
),
g_Pcbnew_Editor_Hokeys_Descr
,
HK_CANVAS_CAIRO
,
IS_ACCELERATOR
);
...
...
pcbnew/pcbframe.cpp
View file @
f9d74ccb
...
...
@@ -163,7 +163,6 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
EVT_MENU
(
ID_MENU_CANVAS_DEFAULT
,
PCB_EDIT_FRAME
::
SwitchCanvas
)
EVT_MENU
(
ID_MENU_CANVAS_CAIRO
,
PCB_EDIT_FRAME
::
SwitchCanvas
)
EVT_MENU
(
ID_MENU_CANVAS_OPENGL
,
PCB_EDIT_FRAME
::
SwitchCanvas
)
EVT_MENU
(
ID_MENU_CANVAS_OPENGL_SHADERS
,
PCB_EDIT_FRAME
::
SwitchCanvas
)
// Menu Get Design Rules Editor
EVT_MENU
(
ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG
,
PCB_EDIT_FRAME
::
ShowDesignRulesEditor
)
...
...
@@ -611,12 +610,7 @@ void PCB_EDIT_FRAME::SwitchCanvas( wxCommandEvent& aEvent )
break
;
case
ID_MENU_CANVAS_OPENGL
:
m_galCanvas
->
SwitchBackend
(
EDA_DRAW_PANEL_GAL
::
GAL_TYPE_OPENGL
,
false
);
UseGalCanvas
(
true
);
break
;
case
ID_MENU_CANVAS_OPENGL_SHADERS
:
m_galCanvas
->
SwitchBackend
(
EDA_DRAW_PANEL_GAL
::
GAL_TYPE_OPENGL
,
true
);
m_galCanvas
->
SwitchBackend
(
EDA_DRAW_PANEL_GAL
::
GAL_TYPE_OPENGL
);
UseGalCanvas
(
true
);
break
;
}
...
...
pcbnew/pcbnew_id.h
View file @
f9d74ccb
...
...
@@ -268,7 +268,6 @@ enum pcbnew_ids
ID_MENU_PCB_SHOW_3D_FRAME
,
ID_MENU_CANVAS_DEFAULT
,
ID_MENU_CANVAS_OPENGL
,
ID_MENU_CANVAS_OPENGL_SHADERS
,
ID_MENU_CANVAS_CAIRO
,
ID_PCB_USER_GRID_SETUP
,
ID_PCB_GEN_BOM_FILE_FROM_BOARD
,
...
...
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