1 #ifndef CMU462_RENDERER_H
2 #define CMU462_RENDERER_H
37 virtual void init(
void ) = 0;
44 virtual void render(
void ) = 0;
54 virtual void resize(
size_t w,
size_t h ) = 0;
61 virtual std::string
name(
void ) = 0;
68 virtual std::string
info(
void ) = 0;
102 virtual void mouse_event(
int key,
int event,
unsigned char mods ) { }
131 #endif // CMU462_RENDERER_H
virtual ~Renderer(void)
Virtual Destructor.
Definition: renderer.h:29
virtual void init(void)=0
Initialize the renderer.
virtual void resize(size_t w, size_t h)=0
Respond to buffer resize.
virtual std::string info(void)=0
Return a brief description of the renderer.
Abstract renderer definition.
Definition: renderer.h:21
void use_hdpi_reneder_target()
Internal - The viewer will tell the renderer if the screen is in HDPI mode.
Definition: renderer.h:121
virtual void scroll_event(float offset_x, float offset_y)
Respond to zoom event.
Definition: renderer.h:89
bool use_hdpi
if the render target is using HIDPI
Definition: renderer.h:125
virtual void render(void)=0
Draw content.
virtual void mouse_event(int key, int event, unsigned char mods)
Respond to mouse click event.
Definition: renderer.h:102
virtual void keyboard_event(int key, int event, unsigned char mods)
Respond to keyboard event.
Definition: renderer.h:115
virtual std::string name(void)=0
Return a name for the renderer.
virtual void cursor_event(float x, float y)
Respond to cursor events.
Definition: renderer.h:79