import std.stdio; import derelict.sdl2.sdl; import derelict.opengl3.gl3; int main() { DerelictSDL2.load(); DerelictGL3.load(); if (SDL_Init(SDL_INIT_EVERYTHING)) { writeln("Failed to initialize SDL!"); return 1; } SDL_Window * window = SDL_CreateWindow("d-dub-derelict-sdl2-gl3-demo", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 800, 600, SDL_WINDOW_OPENGL); SDL_GLContext context = SDL_GL_CreateContext(window); if (window == null) { writeln("Failed to create SDL window!"); return 1; } DerelictGL3.reload(); SDL_Delay(2000); SDL_DestroyWindow(window); SDL_Quit(); return 0; }