#include <Surface.hpp>
Definition at line 38 of file Surface.hpp.
◆ lock_status_t
Enumerator |
---|
unlocked | |
not_ready | |
locked_changed | |
locked_same | |
Definition at line 42 of file Surface.hpp.
◆ Surface() [1/2]
◆ Surface() [2/2]
gamp::wt::Surface::Surface |
( |
const Surface & | | ) |
|
|
delete |
◆ ~Surface()
virtual gamp::wt::Surface::~Surface |
( |
| ) |
|
|
inlinevirtualnoexcept |
Releases this instance.
Definition at line 92 of file Surface.hpp.
◆ is_locked()
static constexpr bool gamp::wt::Surface::is_locked |
( |
const lock_status_t | ls | ) |
|
|
inlinestaticconstexprnoexcept |
◆ shared_from_base()
template<typename ChildT>
std::shared_ptr< ChildT > gamp::wt::Surface::shared_from_base |
( |
| ) |
|
|
inlineprotected |
◆ setSurfaceSize()
void gamp::wt::Surface::setSurfaceSize |
( |
const Vec2i & | sz | ) |
|
|
inlineprotectednoexcept |
◆ nativeSurfaceLock()
|
inlineprotectedvirtualnoexcept |
◆ nativeSurfaceUnlock()
virtual void gamp::wt::Surface::nativeSurfaceUnlock |
( |
| ) |
|
|
inlineprotectedvirtualnoexcept |
◆ create()
◆ operator=()
void gamp::wt::Surface::operator= |
( |
const Surface & | | ) |
|
|
delete |
◆ disposedNotify()
◆ dispose()
◆ shared()
◆ createContext() [1/2]
◆ createContext() [2/2]
◆ renderContext() [1/2]
◆ renderContext() [2/2]
◆ capabilities()
const Capabilities * gamp::wt::Surface::capabilities |
( |
| ) |
const |
|
inlinenoexcept |
◆ swapInterval()
int gamp::wt::Surface::swapInterval |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Returns desired or determined swap interval.
Defaults to -1, i.e. adaptive swap interval.
Use setSwapInterval() to set the swap interval.
- [1..n] denotes the swap interval
- 0 indicates no swap interval, e.g. by failed setSwapInterval()
- -1 indicates adaptive swap interval
Definition at line 147 of file Surface.hpp.
◆ setSwapInterval()
bool gamp::wt::Surface::setSwapInterval |
( |
int | v | ) |
|
|
inlinenoexcept |
◆ isBLOriented()
bool gamp::wt::Surface::isBLOriented |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Returns true
if this surface is rendered in OpenGL's coordinate system, origin at bottom left.
Otherwise returns false
, i.e. origin at top left.
Default impl. is true
, i.e. OpenGL bottom-left coordinate system.
Currently only MS-Windows bitmap offscreen drawable uses a non OpenGL orientation and hence returns false
.
This removes the need of a vertical flip when used in AWT or Windows applications.
Definition at line 168 of file Surface.hpp.
◆ surfaceSize()
const Vec2i & gamp::wt::Surface::surfaceSize |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Returns the surface size of the client area excluding insets (window decorations) in pixel units.
Definition at line 171 of file Surface.hpp.
◆ surfaceHandle()
handle_t gamp::wt::Surface::surfaceHandle |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Returns the handle to the surface for this NativeSurface.
The surface handle should be set/update by lockSurface()
, where unlockSurface()
is not allowed to modify it. After unlockSurface()
it is no more guaranteed that the surface handle is still valid.
The surface handle shall reflect the platform one for all drawable surface operations, e.g. opengl, swap-buffer.
On X11 this returns an entity of type Window, since there is no differentiation of surface and window there.
On Microsoft Windows this returns an entity of type HDC.
Definition at line 188 of file Surface.hpp.
◆ isValid()
virtual bool gamp::wt::Surface::isValid |
( |
| ) |
const |
|
inlinevirtualnoexcept |
◆ surfaceSwap()
virtual bool gamp::wt::Surface::surfaceSwap |
( |
| ) |
|
|
inlinevirtualnoexcept |
Provide a mechanism to utilize custom (pre-) swap surface code.
This method is called before the render toolkit (e.g. JOGL) swaps the buffer/surface if double buffering is enabled.
The implementation may itself apply the swapping, in which case true shall be returned.
- Returns
- true if this method completed swapping the surface, otherwise false, in which case eg the GLDrawable implementation has to swap the code.
Reimplemented in gamp::wt::Window.
Definition at line 204 of file Surface.hpp.
◆ lockSurface()
Lock the surface of this native window.
The surface handle shall be valid after a successfull call, i.e. return a value other than lock_status_t::unlocked and lock_status_t::not_ready.
The caller may need to take care of the result lock_status_t::locked_changed, where the surface handle is valid but has changed.
This call is blocking until the surface has been locked or a timeout is reached. The latter will throw a runtime exception.
This call allows recursion from the same thread.
The implementation may want to aquire the application level com.jogamp.common.util.locks.RecursiveLock
first before proceeding with a native surface lock.
The implementation shall also invoke AbstractGraphicsDevice#lock()
for the initial lock (recursive count zero).
- Returns
- Surface::lock_status_t
- Exceptions
-
RuntimeException | after timeout when waiting for the surface lock |
NativeWindowException | if native locking failed, maybe platform related |
Definition at line 232 of file Surface.hpp.
◆ unlockSurface()
void gamp::wt::Surface::unlockSurface |
( |
| ) |
|
|
inline |
Unlock the surface of this native window.
Shall not modify the surface handle, see lockSurface().
The implementation shall also invoke GraphicsDevice::unlock() for the final unlock (recursive count zero).
The implementation shall be fail safe, i.e. tolerant in case the native resources are already released / unlocked. In this case the implementation shall simply ignore the call.
- See also
- lockSurface()
Definition at line 260 of file Surface.hpp.
◆ toString()
std::string gamp::wt::Surface::toString |
( |
| ) |
const |
|
inlinenoexcept |
◆ TIMEOUT
The documentation for this class was generated from the following files: