diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-12-05 23:57:53 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-12-05 23:57:53 -0500 |
commit | 950b3c95590aea7420e7dd4c7ae21ba0a0805ea6 (patch) | |
tree | 3fe285820ef7bce254fbd0b22f3f3c7bbb6c3a7d /main.c | |
parent | 50fb1482f6dd3d738ba5fd23dfa6789c0f397c92 (diff) |
shader
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -213,7 +213,7 @@ int main(void) { } SDL_Window *window = SDL_CreateWindow("", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, - 720, 720, SDL_WINDOW_SHOWN|SDL_WINDOW_OPENGL); + 720, 720, SDL_WINDOW_SHOWN|SDL_WINDOW_OPENGL|SDL_WINDOW_RESIZABLE); if (!window) { die("%s", SDL_GetError()); } @@ -250,6 +250,8 @@ int main(void) { die("Couldn't allocate memory (%lu bytes).", (ulong)frame.memory_size); } + frame.get_gl_proc = (void (*(*)(char const *))(void))SDL_GL_GetProcAddress; + Uint32 last_frame_ticks = SDL_GetTicks(); while (1) { @@ -279,7 +281,7 @@ int main(void) { #else #define DYNLIB_EXT "dll" #endif - struct timespec new_dynlib_last_modified = last_modified("obj/sim." DYNLIB_EXT "_changed"); + struct timespec new_dynlib_last_modified = time_last_modified("obj/sim." DYNLIB_EXT "_changed"); if (timespec_cmp(dynlib_last_modified, new_dynlib_last_modified) != 0) { // reload dynlib char new_filename[256] = {0}; |