space-game001/Game.h
Vladislav Khorev b45d9300bd New version
2025-11-30 22:46:42 +03:00

40 lines
802 B
C++
Executable File

#pragma once
#include "OpenGlExtensions.h"
#include "Renderer.h"
#include "Environment.h"
#include "TextureManager.h"
namespace ZL {
class Game {
public:
Game();
~Game();
void setup();
void update();
void render();
bool shouldExit() const { return Environment::exitGameLoop; }
private:
void processTickCount();
void drawScene();
SDL_Window* window;
SDL_GLContext glContext;
Renderer renderer;
size_t newTickCount;
size_t lastTickCount;
static const size_t CONST_TIMER_INTERVAL = 10;
static const size_t CONST_MAX_TIME_INTERVAL = 1000;
std::shared_ptr<Texture> spaceshipTexture;
VertexDataStruct spaceshipBase;
VertexRenderStruct spaceship;
};
} // namespace ZL