Browse Source

show icon

opengl-renderer-broken
Martin Dørum 4 years ago
parent
commit
c912485f2c
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      src/main.cc

+ 7
- 0
src/main.cc View File

@@ -42,6 +42,13 @@ int main() {
SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI),
SDL_DestroyWindow);

// Load and display application icon
auto icon = makeRaiiPtr(
IMG_Load("assets/icon.png"),
SDL_FreeSurface);
sdlassert(icon, "Could not load icon");
SDL_SetWindowIcon(window.get(), icon.get());

auto renderer = makeRaiiPtr(
SDL_CreateRenderer(
window.get(), -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC),

Loading…
Cancel
Save