Skip to content

Instantly share code, notes, and snippets.

@agvxov
Created January 29, 2025 13:09
Show Gist options
  • Select an option

  • Save agvxov/409c151e1547532175ecfd273cedb09d to your computer and use it in GitHub Desktop.

Select an option

Save agvxov/409c151e1547532175ecfd273cedb09d to your computer and use it in GitHub Desktop.
{ // sdl_hw.c
// @BAKE gcc $@ -o sdl_hw.out -Wall -Wpedantic $(pkg-config --cflags --libs sdl2)
#include <SDL.h>
signed main(int argc, char* argv[]) {
SDL_Init(SDL_INIT_VIDEO);
SDL_Window* window = SDL_CreateWindow("HW", 0, 0, 800, 800, SDL_WINDOW_SHOWN);
SDL_Renderer* renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);
SDL_SetRenderDrawColor(renderer, 255, 0, 0, 255);
SDL_RenderClear(renderer);
SDL_RenderPresent(renderer);
while (1) { ; }
return 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment