gramods
|
An SDL window implementation. More...
#include <SdlWindow.hh>
Public Member Functions | |
void | initialize () override |
Called to initialize the Object. More... | |
void | makeGLContextCurrent () override |
Asks the Window to make its GL context current. More... | |
gmCore::size2 | getSize () |
Returns the size of the drawable canvas of this window, in pixels. More... | |
void | close () override |
Close window. More... | |
void | setUseQuadBuffers (bool on) |
Sets if quad buffers should be requested for the GL context. More... | |
void | setGLMajor (int v) |
Sets the major version to be requested for the GL context in this Window. More... | |
void | setGLMinor (int v) |
Sets the minor version to be requested for the GL context in this Window. More... | |
void | setGLProfile (std::string s) |
Sets the profile to be requested for the GL context in this Window. More... | |
void | setContext (std::shared_ptr< gmCore::SdlContext > ctx) |
The SDL context. More... | |
void | processEvents () override |
Triggers the windows to process its incoming events. More... | |
bool | isOpen () override |
Returns true as long as the window is open. More... | |
void | swap () override |
Finalizes the rendering and swaps the render buffers to show the newly rendered material. More... | |
void | traverse (Visitor *visitor) override |
Propagates the specified visitor. More... | |
![]() | |
void | renderFullPipeline (ViewSettings settings) override |
Dispatches specified renders, both method argument and class members, to the views in this window. More... | |
void | traverse (Visitor *visitor) override |
Propagates the specified visitor. More... | |
void | addView (std::shared_ptr< View > view) |
Adds a view to the window. More... | |
virtual void | setFullscreen (bool on) |
Activates or deactivates fullscreen mode. More... | |
virtual void | setDisplay (size_t N) |
Set on which display the window should be shown. More... | |
virtual void | setSize (gmCore::size2 s) |
Sets the size of the drawable canvas of this window, in pixels. More... | |
virtual void | setPosition (gmCore::int2 p) |
Sets the position of the window. More... | |
virtual void | setTitle (std::string t) |
Sets the title of the windows. More... | |
virtual void | setBackgroundColor (gmCore::float4 c) |
Set the background color of the window. More... | |
virtual bool | handleEvent (event *) |
Internal events handler, called from processEvents(). More... | |
void | addEventHandler (std::function< bool(const event *)> fun, void *tag) |
Registers an event handler associated with the specified tag. More... | |
void | removeEventHandler (void *tag) |
Removes the event handler associnated with the specified tag. More... | |
virtual void | sync () |
Calls glFinish on the GL context. More... | |
![]() | |
void | addNode (std::shared_ptr< Node > node) |
Adds a scenegraph to the view. More... | |
void | setViewpoint (std::shared_ptr< Viewpoint > viewpoint) |
Sets the viewpoint to use in the views rendered by this ViewBase. More... | |
void | addViewpoint (std::shared_ptr< Viewpoint > viewpoint) |
Adds a viewpoint to use in the views rendered by this ViewBase. More... | |
![]() | |
Object () | |
Initializes internal data. More... | |
virtual | ~Object () |
Cleaning up internal data. More... | |
virtual void | accept (Visitor *visitor) |
Calls the visitors apply method with this as argument. More... | |
virtual std::string | getDefaultKey () |
Returns the default key for the Object when automatically instantiated in a Configuration, i.e. More... | |
bool | isInitialized () |
Returns true if the Object is initialized. More... | |
Static Public Attributes | |
static gramods::gmCore::OFactory::OFactoryInformation | _gm_ofi |
![]() | |
static gramods::gmCore::OFactory::OFactoryInformation | _gm_ofi |
![]() | |
static gramods::gmCore::OFactory::OFactoryInformation | _gm_ofi |
Additional Inherited Members | |
![]() | |
void | populateViewSettings (ViewSettings &settings) |
Adds the dispatcher's local renderers and viewpoint, if set. More... | |
![]() | |
std::vector< std::shared_ptr< View > > | views |
bool | fullscreen = false |
size_t | display = 0 |
std::string | title = "untitled gramods window" |
gmCore::size2 | size = {640, 480} |
gmCore::int2 | position |
gmCore::float4 | background_color = {0.f, 0.f, 0.f, 0.f} |
std::unordered_map< void *, std::function< bool(const event *)> > | event_handlers |
![]() | |
Node::list | nodes |
std::vector< std::shared_ptr< Viewpoint > > | viewpoints |
An SDL window implementation.
|
overridevirtual |
Close window.
Implements gramods::gmGraphics::Window.
|
virtual |
Returns the size of the drawable canvas of this window, in pixels.
Reimplemented from gramods::gmGraphics::Window.
|
overridevirtual |
Called to initialize the Object.
This should be called once only!
Sub classes should override this method to make use of set parameter data. They should also always call its base class' implementation as well.
Reimplemented from gramods::gmCore::Object.
|
overridevirtual |
Returns true as long as the window is open.
This does not necessarily mean that the window is visible.
Reimplemented from gramods::gmGraphics::Window.
|
overridevirtual |
Asks the Window to make its GL context current.
This is called automatically by the renderFullPipeline method.
Implements gramods::gmGraphics::Window.
|
overridevirtual |
Triggers the windows to process its incoming events.
This must be called at even intervals for the window to behave properly.
Implements gramods::gmGraphics::Window.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Sets if quad buffers should be requested for the GL context.
XML-attribute: useQuadBuffers
|
overridevirtual |
Finalizes the rendering and swaps the render buffers to show the newly rendered material.
Implements gramods::gmGraphics::Window.
|
overridevirtual |
Propagates the specified visitor.
Reimplemented from gramods::gmCore::Object.