mirror of https://github.com/kurisufriend/threedee
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
839 B
40 lines
839 B
#include <Windows.h>
|
|
#include <stdio.h>
|
|
#include <iostream>
|
|
#include "SDL.h"
|
|
|
|
#include "demo/demo.h"
|
|
|
|
int main(int argc, char** argv)
|
|
{
|
|
SDL_Window* window = nullptr;
|
|
SDL_Surface* surface = nullptr;
|
|
SDL_Renderer* renderer = nullptr;
|
|
|
|
SDL_Init(SDL_INIT_VIDEO);
|
|
window = SDL_CreateWindow("threedee", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 1280, 720, SDL_WINDOW_SHOWN);
|
|
surface = SDL_GetWindowSurface(window);
|
|
renderer = SDL_CreateRenderer(window, -1, NULL);
|
|
SETRENDER_WHITE;
|
|
SDL_Event eventHandler;
|
|
|
|
global::entList.push_back(&square(200, 200, 50));
|
|
|
|
while (global::running)
|
|
{
|
|
callbacks::handleCallbacks(&eventHandler);
|
|
|
|
SETRENDER_BLACK;
|
|
SDL_RenderClear(renderer);
|
|
SETRENDER_WHITE;
|
|
|
|
game::run(renderer);
|
|
|
|
SDL_RenderPresent(renderer);
|
|
SDL_Delay(1);
|
|
}
|
|
SDL_DestroyWindow(window);
|
|
SDL_Quit();
|
|
|
|
return 0;
|
|
} |