1 #ifndef CMU462_VIEWER_H
2 #define CMU462_VIEWER_H
9 #include "GLFW/glfw3.h"
33 Viewer(
const char* title );
67 static void update(
void );
72 static void drawInfo(
void );
75 static void err_callback(
int error,
const char* description );
76 static void key_callback( GLFWwindow* window,
int key,
int scancode,
int action,
int mods );
77 static void resize_callback( GLFWwindow* window,
int width,
int height );
78 static void cursor_callback( GLFWwindow* window,
double xpos,
double ypos );
79 static void scroll_callback( GLFWwindow* window,
double xoffset,
double yoffset);
80 static void mouse_button_callback( GLFWwindow* window,
int button,
int action,
int mods );
86 static int framecount;
87 static std::chrono::time_point<std::chrono::system_clock> sys_last;
88 static std::chrono::time_point<std::chrono::system_clock> sys_curr;
94 static GLFWwindow* window;
95 static size_t buffer_w;
96 static size_t buffer_h;
103 static int line_id_renderer;
104 static int line_id_framerate;
111 #endif // CMU462_VIEWER_H
Abstract renderer definition.
Definition: renderer.h:21
void set_renderer(Renderer *renderer)
Set a user space renderer.
Definition: viewer.cpp:148
~Viewer(void)
Destructor.
Definition: viewer.cpp:49
Provides OpenGL context, window display, and event handling routines.
Definition: viewer.h:20
void start(void)
Start the drawing loop of the viewer.
Definition: viewer.cpp:137
Provides an interface for text on-screen display.
Definition: osdtext.h:47
Viewer(void)
Constructor.
Definition: viewer.cpp:45
void init(void)
Initialize the viewer.
Definition: viewer.cpp:60