25 #ifndef CPP3DS_WINDOW_HPP
26 #define CPP3DS_WINDOW_HPP
31 #include <cpp3ds/System/Clock.hpp>
32 #include <cpp3ds/System/Vector2.hpp>
33 #include <cpp3ds/System/NonCopyable.hpp>
34 #include <cpp3ds/System/String.hpp>
35 #include <cpp3ds/Graphics/RenderTexture.hpp>
179 bool setActive(
bool active =
true)
const;
217 virtual bool activate(
bool active);
Window that serves as a target for OpenGL rendering.
Vector2u m_size
Current size of the window.
void close()
Close the window and destroy all the attached resources.
void create(const ContextSettings &settings=ContextSettings())
Create (or recreate) the window.
priv::GlContext * m_context
Platform-specific implementation of the OpenGL context.
bool setActive(bool active=true) const
Activate or deactivate the window as the current target for OpenGL rendering.
void display()
Display on screen what has been rendered to the window so far.
Image capture() const
Copy the current contents of the window to an image.
Clock m_clock
Clock for measuring the elapsed time between frames.
virtual Vector2u getSize() const
Get the size of the rendering region of the window.
Utility class that measures the elapsed time.
void initialize()
Perform some common internal initializations.
Class for loading, manipulating and saving images.
Base class for all render targets (window, texture, ...)
virtual ~Window()
Destructor.
void setVerticalSyncEnabled(bool enabled)
Enable or disable vertical synchronization.
Time m_frameTimeLimit
Current framerate limit.
bool isOpen() const
Tell whether or not the window is open.
const ContextSettings & getSettings() const
Get the settings of the OpenGL context of the window.
Window()
Default constructor.
void setFramerateLimit(unsigned int limit)
Limit the framerate to a maximum fixed frequency.
Structure defining the settings of the OpenGL context attached to a window.
Base class for classes that require an OpenGL context.