Initial scaffolding.

This commit is contained in:
BadQuanta
2026-04-20 11:00:42 +00:00
commit 6d0de7e621
7 changed files with 118 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
# Simple examples for using hdk-sdl.
add_executable(HelloWorld HelloWorld.cpp)
target_link_libraries(HelloWorld PRIVATE hdk-sdl)
+27
View File
@@ -0,0 +1,27 @@
#include <hdk/sdl.hpp>
using namespace hdk::sdl;
Window window { nullptr };
//Renderer renderer { nullptr };
int main(int argc, char* argv[])
{
window = Window::Create("Hello World", 800, 600, 0);
if (!window) {
SDL_Log("Failed to create window: %s", SDL_GetError());
return 1;
}
//
SDL_Event event;
bool running = true;
while (running) {
while (SDL_PollEvent(&event)) {
if (event.type == SDL_EVENT_QUIT) {
running = false;
}
}
}
window = nullptr; // Explicitly release the window before quitting SDL
return 0;
}