diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-11-25 11:43:13 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-11-25 11:43:13 -0500 |
commit | b58e9a3faa4e35ff6e872e28c7051fa19e2b11ad (patch) | |
tree | ba0ab494e36a98cbaa92b99ad1949256e4a98279 /main.c | |
parent | c2f91a659c126d1fd5ee951bdf58540d9d39fd47 (diff) |
icon
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -43,6 +43,12 @@ int main(void) { if (!window) die("%s", SDL_GetError()); + { // set icon + SDL_Surface *icon = SDL_LoadBMP("assets/icon.bmp"); + SDL_SetWindowIcon(window, icon); + SDL_FreeSurface(icon); + } + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0); SDL_GLContext *glctx = SDL_GL_CreateContext(window); @@ -95,7 +101,6 @@ int main(void) { glClear(GL_COLOR_BUFFER_BIT); glColor3f(1,1,1); - //text_render(font, "hellσ! öθ☺", 50, 50); text_buffer_render(&text_buffer, font, 50, window_heightf-50, window_widthf-100, window_heightf-100); if (text_has_err()) { printf("Text error: %s\n", text_get_err()); |