citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit df82a2b27ef0349e64096e64fec7b88bbe0b696f
parent ac7427c9305f93fece67a2d0cfb2e12f21c6c270
Author: Kyle Milz <kyle@0x30.net>
Date:   Sun, 11 Dec 2016 17:24:56 -0700

src: move demo_font_t into local scope

Diffstat:
Msrc/gl_main.cc | 11+++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/gl_main.cc b/src/gl_main.cc @@ -31,7 +31,6 @@ View *static_vu; FT_Library ft_library; FT_Face ft_face; -demo_font_t *font; demo_buffer_t *buffer; void @@ -65,7 +64,7 @@ motion_func(int x, int y) } void -add_new_process(std::string const &file_name) +add_new_process(std::string const &file_name, demo_font_t *font) { drawables.push_back(ProcessFile(file_name)); ProcessFile *pfile = &drawables.back(); @@ -93,10 +92,10 @@ add_new_process(std::string const &file_name) } void -next_frame(View *vu) +next_frame(View *vu, demo_font_t *font) { for (std::string &file_name : m_pdir.scan()) - add_new_process(file_name); + add_new_process(file_name, font); for (auto &rp : drawables) { // rp.read_executions(); @@ -167,7 +166,7 @@ main(int argc, char *argv[]) ft_face = NULL; FT_New_Face(ft_library, FONT_PATH, /* face_index */ 0, &ft_face); - font = demo_font_create(ft_face, demo_glstate_get_atlas(st)); + demo_font_t *font = demo_font_create(ft_face, demo_glstate_get_atlas(st)); static_vu->setup(); @@ -177,7 +176,7 @@ main(int argc, char *argv[]) while (!glfwWindowShouldClose(window)) { - next_frame(static_vu); + next_frame(static_vu, font); static_vu->display(); glfwSwapBuffers(window);