20 #if !defined(__MITSUBA_HW_VIEWER_H_)
21 #define __MITSUBA_HW_VIEWER_H_
48 int run(
int argc,
char **argv);
51 void drawHUD(
const std::string &text);
54 inline void redraw() { m_leaveEventLoop =
true; }
57 virtual void draw() = 0;
69 virtual bool init(
int argc,
char **argv);
72 virtual void shutdown();
81 virtual void mouseButtonPressed(
const DeviceEvent &event);
84 virtual void mouseButtonReleased(
const DeviceEvent &event);
90 virtual void mouseBeginDrag(
const DeviceEvent &event);
93 virtual void mouseDragged(
const DeviceEvent &event);
96 virtual void mouseEndDrag(
const DeviceEvent &event);
99 virtual void windowResized(
const DeviceEvent &event);
110 bool m_quit, m_leaveEventLoop;
virtual bool deviceEventOccurred(const DeviceEvent &event)=0
Called when a device event occurs.
The device event structure encapsulates event information such as mouse movement or key presses...
Definition: device.h:34
Utility class used to render text inside OpenGL programs using pre-rasterized TrueType fonts stored a...
Definition: font.h:34
Abstract utility class – can be used to implement loadable utility plugins that perform various actio...
Definition: util.h:32
#define MTS_DECLARE_UTILITY()
Definition: util.h:59
An abstract drawing device.
Definition: device.h:136
Abstract device event callback.
Definition: device.h:121
void redraw()
Request that the draw() routine be called.
Definition: viewer.h:54
Template for simple GLUT-style viewer applications.
Definition: viewer.h:37
Reference counting helper.
Definition: ref.h:40
Abstract renderer implementation.
Definition: renderer.h:79
Abstract windowing environment session.
Definition: session.h:32
virtual int run(int argc, char **argv)=0