Setup inotify to watch for modifications of buffer source files
This commit is contained in:
parent
ea6dfed522
commit
1d6319e928
2 changed files with 26 additions and 1 deletions
|
@ -9,6 +9,7 @@
|
|||
struct shader_state {
|
||||
unsigned int program; /**< Shader program ID. */
|
||||
const char *filename; /**< Shader file name. */
|
||||
int wd; /**< inotify watch descriptor. */
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -19,9 +20,10 @@ struct renderer_state {
|
|||
GLFWwindow *window; /**< GLFW window where the shaders are rendered. */
|
||||
struct shader_state screen_shader; /**< Shader for the main screen. */
|
||||
struct shader_state buffer_shader; /**< Shader for the framebuffer. */
|
||||
int inotify_fd; /**< inotify file descriptor. */
|
||||
size_t frame_count; /**< Frame count since the start of the render loop. */
|
||||
size_t prev_frame_count; /**< Frame count at the last log. */
|
||||
double time; /**< Time in seconds since the beginning of the render loop. */
|
||||
double time; /**< Time in seconds since the start of the render loop. */
|
||||
double prev_time; /**< Time in seconds at the last log. */
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue