renderer.h
#ifndef CMU462_RENDERER_H
#define CMU462_RENDERER_H
#include <stdio.h>
#include <string>
namespace CMU462 {
class Renderer {
public:
virtual ~Renderer( void ) { }
virtual void init( void ) = 0;
virtual void render( void ) = 0;
virtual void resize( size_t w, size_t h ) = 0;
virtual std::string name( void ) = 0;
virtual std::string info( void ) = 0;
virtual void key_event( char key ) = 0;
virtual void cursor_event( float x, float y, unsigned char keys ) = 0;
virtual void scroll_event( float offset_x, float offset_y ) = 0;
};
} // namespace CMU462
#endif // CMU462_RENDERER_H
CMU462::Renderer::~Renderer
virtual ~Renderer(void)
Virtual Destructor.
Definition: renderer.h:27
CMU462::Renderer::init
virtual void init(void)=0
Initialize the renderer.
CMU462::Renderer::cursor_event
virtual void cursor_event(float x, float y, unsigned char keys)=0
Respond to cursor events.
CMU462::Renderer::resize
virtual void resize(size_t w, size_t h)=0
Respond to buffer resize.
CMU462::Renderer::info
virtual std::string info(void)=0
Return a brief description of the renderer.
CMU462
Definition: color.cpp:10
CMU462::Renderer
Abstract renderer definition.
Definition: renderer.h:19
CMU462::Renderer::key_event
virtual void key_event(char key)=0
Respond to key event.
CMU462::Renderer::render
virtual void render(void)=0
Draw content.
CMU462::Renderer::scroll_event
virtual void scroll_event(float offset_x, float offset_y)=0
Respond to zoom event.
CMU462::Renderer::name
virtual std::string name(void)=0
Return a name for the renderer.