20 #if !defined(__MITSUBA_HW_WGLDEVICE_H_)
21 #define __MITSUBA_HW_WGLDEVICE_H_
52 void setTitle(
const std::string &title);
55 void showCursor(
bool enabled);
58 void warpMouse(
const Point2i &position);
61 void setGrab(
bool grab);
67 static LONG WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
78 void initPixelFormat(HWND hWnd);
81 bool translateKey(WPARAM vkey, LPARAM lParam,
DeviceEvent &event);
84 bool translateMouse(UINT uMsg, WPARAM wParam,
DeviceEvent &event);
86 ref<WGLDevice> m_parent;
89 PIXELFORMATDESCRIPTOR m_pfd;
100 bool m_mouseInWindow;
The device event structure encapsulates event information such as mouse movement or key presses...
Definition: device.h:34
Windows (WGL) device implementation.
Definition: wgldevice.h:31
HDC getDeviceContext() const
Return the device context.
Definition: wgldevice.h:70
virtual void setPosition(const Point2i &position)
Set the position of the device.
virtual void flip()
Flip the buffers (when using double buffering)
virtual void shutdown()
Shut the device down.
virtual void makeCurrent(Renderer *renderer)=0
Associate the renderer with this device.
virtual void setVisible(bool visible)=0
Only applies to devices, which are UI windows.
virtual void init(Device *other=NULL)
Windows (WGL) windowing environment session.
Definition: wglsession.h:32
An abstract drawing device.
Definition: device.h:136
#define MTS_DECLARE_CLASS()
This macro must be used in the initial definition in classes that derive from Object.
Definition: class.h:158
Reference counting helper.
Definition: ref.h:40
Abstract renderer implementation.
Definition: renderer.h:79
virtual void setTitle(const std::string &title)
Set the window title.