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
bc69429a
Commit
bc69429a
authored
Aug 06, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added GetTarget() for GALs.
parent
7d5a4563
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
0 deletions
+31
-0
cairo_gal.cpp
common/gal/cairo/cairo_gal.cpp
+8
-0
opengl_gal.cpp
common/gal/opengl/opengl_gal.cpp
+8
-0
cairo_gal.h
include/gal/cairo/cairo_gal.h
+4
-0
graphics_abstraction_layer.h
include/gal/graphics_abstraction_layer.h
+7
-0
opengl_gal.h
include/gal/opengl/opengl_gal.h
+4
-0
No files found.
common/gal/cairo/cairo_gal.cpp
View file @
bc69429a
...
...
@@ -740,6 +740,14 @@ void CAIRO_GAL::SetTarget( RenderTarget aTarget )
}
cairo_push_group
(
currentContext
);
currentTarget
=
aTarget
;
}
RenderTarget
CAIRO_GAL
::
GetTarget
()
const
{
return
currentTarget
;
}
...
...
common/gal/opengl/opengl_gal.cpp
View file @
bc69429a
...
...
@@ -700,6 +700,14 @@ void OPENGL_GAL::SetTarget( RenderTarget aTarget )
currentManager
=
&
overlayManager
;
break
;
}
currentTarget
=
aTarget
;
}
RenderTarget
OPENGL_GAL
::
GetTarget
()
const
{
return
currentTarget
;
}
...
...
include/gal/cairo/cairo_gal.h
View file @
bc69429a
...
...
@@ -218,6 +218,9 @@ public:
/// @copydoc GAL::SetTarget()
virtual
void
SetTarget
(
RenderTarget
aTarget
);
/// @copydoc GAL::GetTarget()
virtual
RenderTarget
GetTarget
()
const
;
// -------
// Cursor
// -------
...
...
@@ -263,6 +266,7 @@ private:
boost
::
shared_ptr
<
CAIRO_COMPOSITOR
>
compositor
;
///< Object for layers compositing
unsigned
int
mainBuffer
;
///< Handle to the main buffer
unsigned
int
overlayBuffer
;
///< Handle to the overlay buffer
RenderTarget
currentTarget
;
///< Current rendering target
// Variables related to wxWidgets
wxWindow
*
parentWindow
;
///< Parent window
...
...
include/gal/graphics_abstraction_layer.h
View file @
bc69429a
...
...
@@ -572,6 +572,13 @@ public:
*/
virtual
void
SetTarget
(
RenderTarget
aTarget
)
=
0
;
/**
* @brief Gets the currently used target for rendering.
*
* @return The current rendering target.
*/
virtual
RenderTarget
GetTarget
()
const
=
0
;
// -------------
// Grid methods
// -------------
...
...
include/gal/opengl/opengl_gal.h
View file @
bc69429a
...
...
@@ -211,6 +211,9 @@ public:
/// @copydoc GAL::SetTarget()
virtual
void
SetTarget
(
RenderTarget
aTarget
);
/// @copydoc GAL::GetTarget()
virtual
RenderTarget
GetTarget
()
const
;
// -------
// Cursor
// -------
...
...
@@ -283,6 +286,7 @@ private:
OPENGL_COMPOSITOR
compositor
;
///< Handles multiple rendering targets
unsigned
int
mainBuffer
;
///< Main rendering target
unsigned
int
overlayBuffer
;
///< Auxiliary rendering target (for menus etc.)
RenderTarget
currentTarget
;
///< Current rendering target
// Shader
SHADER
shader
;
///< There is only one shader used for different objects
...
...
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