2021-09-24 10:15:43 -04:00
|
|
|
#ifndef ENGINE_H__
|
|
|
|
#define ENGINE_H__
|
|
|
|
#include "define.h"
|
|
|
|
#include "openglcontext.h"
|
|
|
|
#include "texture.h"
|
2021-09-27 10:20:58 -04:00
|
|
|
#include "transformation.h"
|
2021-09-27 13:15:57 -04:00
|
|
|
#include "player.h"
|
2021-09-24 10:15:43 -04:00
|
|
|
|
|
|
|
class Engine : public OpenglContext
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Engine();
|
|
|
|
virtual ~Engine();
|
|
|
|
virtual void Init();
|
|
|
|
virtual void DeInit();
|
|
|
|
virtual void LoadResource();
|
|
|
|
virtual void UnloadResource();
|
|
|
|
virtual void Render(float elapsedTime);
|
|
|
|
virtual void KeyPressEvent(unsigned char key);
|
|
|
|
virtual void KeyReleaseEvent(unsigned char key);
|
|
|
|
virtual void MouseMoveEvent(int x, int y);
|
|
|
|
virtual void MousePressEvent(const MOUSE_BUTTON &button, int x, int y);
|
|
|
|
virtual void MouseReleaseEvent(const MOUSE_BUTTON &button, int x, int y);
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool LoadTexture(Texture& texture, const std::string& filename, bool stopOnError = true);
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool m_wireframe = false;
|
|
|
|
|
|
|
|
Texture m_textureFloor;
|
2021-09-27 10:20:58 -04:00
|
|
|
Texture m_textureSkybox;
|
2021-10-04 12:29:10 -04:00
|
|
|
Texture m_textureCube1;
|
|
|
|
Texture m_textureCube2;
|
|
|
|
Texture m_textureCube3;
|
|
|
|
Texture m_textureCube4;
|
2021-09-24 10:15:43 -04:00
|
|
|
|
2021-09-27 13:15:57 -04:00
|
|
|
Player m_player = Player(Vector3f(0, 0, 0));
|
|
|
|
|
2021-09-24 10:15:43 -04:00
|
|
|
bool m_keyW = false;
|
|
|
|
bool m_keyA = false;
|
|
|
|
bool m_keyS = false;
|
|
|
|
bool m_keyD = false;
|
2021-10-04 12:29:10 -04:00
|
|
|
bool m_keylshift = false;
|
2021-10-01 10:52:33 -04:00
|
|
|
bool m_keySpace = false;
|
2021-09-24 10:15:43 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ENGINE_H__
|