CMU462 Library Documentation  1.0
15-462/15-662: Computer Graphics (Fall 2015)
renderer.h
1 #ifndef CMU462_RENDERER_H
2 #define CMU462_RENDERER_H
3 
4 #include <stdio.h>
5 #include <string>
6 
7 namespace CMU462 {
8 
19 class Renderer {
20  public:
21 
27  virtual ~Renderer( void ) { }
28 
35  virtual void init( void ) = 0;
36 
42  virtual void render( void ) = 0;
43 
52  virtual void resize( size_t w, size_t h ) = 0;
53 
59  virtual std::string name( void ) = 0;
60 
66  virtual std::string info( void ) = 0;
67 
77  virtual void key_event( char key ) = 0;
78 
91  virtual void cursor_event( float x, float y, unsigned char keys ) = 0;
92 
101  virtual void scroll_event( float offset_x, float offset_y ) = 0;
102 
103 };
104 
105 } // namespace CMU462
106 
107 #endif // CMU462_RENDERER_H
virtual ~Renderer(void)
Virtual Destructor.
Definition: renderer.h:27
virtual void init(void)=0
Initialize the renderer.
virtual void cursor_event(float x, float y, unsigned char keys)=0
Respond to cursor events.
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.
Definition: color.cpp:10
Abstract renderer definition.
Definition: renderer.h:19
virtual void key_event(char key)=0
Respond to key event.
virtual void render(void)=0
Draw content.
virtual void scroll_event(float offset_x, float offset_y)=0
Respond to zoom event.
virtual std::string name(void)=0
Return a name for the renderer.