summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-11-25 11:43:13 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-11-25 11:43:13 -0500
commitb58e9a3faa4e35ff6e872e28c7051fa19e2b11ad (patch)
treeba0ab494e36a98cbaa92b99ad1949256e4a98279 /main.c
parentc2f91a659c126d1fd5ee951bdf58540d9d39fd47 (diff)
icon
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/main.c b/main.c
index f2812f5..d4c61d9 100644
--- a/main.c
+++ b/main.c
@@ -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());