app.d 506 B

123456789101112131415161718192021
  1. import aperture;
  2. // example.
  3. void main() {
  4. int argc;
  5. char** argv;
  6. InitWindow(argc, argv, 800, 600, "test");
  7. Texture tex = LoadTexture("test.png");
  8. while (!WindowShouldClose()) {
  9. SetTargetFPS(60);
  10. PollWindowEvents();
  11. ClearBackground(Colors.BLACK);
  12. BeginDrawing();
  13. DrawTexture(tex, GetScreenWidth()/2, GetScreenHeight()/2, 1.0, Color(128, 128, 128, 255));
  14. DrawText("test", GetScreenWidth()/2, GetScreenHeight()/2, 5, Colors.WHITE);
  15. EndDrawing();
  16. }
  17. UnloadTexture(tex);
  18. CloseWindow();
  19. }