static bool init(int argc, char **argv);
static void process_event(SDL_Event *ev);
static void proc_modkeys();
static bool init(int argc, char **argv);
static void process_event(SDL_Event *ev);
static void proc_modkeys();
int val;
SDL_GL_GetAttribute(SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, &val);
printf("SDL says we %s an sRGB framebuffer\n", val ? "got" : "didn't get");
int val;
SDL_GL_GetAttribute(SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, &val);
printf("SDL says we %s an sRGB framebuffer\n", val ? "got" : "didn't get");
if(!(ctx = SDL_GL_CreateContext(win))) {
fprintf(stderr, "failed to create OpenGL context\n");
if(!(ctx = SDL_GL_CreateContext(win))) {
fprintf(stderr, "failed to create OpenGL context\n");
SDL_GL_GetDrawableSize(win, &win_width, &win_height);
win_aspect = (float)win_width / (float)win_height;
scale_factor = win_width / ev->window.data1;
SDL_GL_GetDrawableSize(win, &win_width, &win_height);
win_aspect = (float)win_width / (float)win_height;
scale_factor = win_width / ev->window.data1;