Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Application.h
- #ifndef _APPLICATION_H_
- #define _APPLICATION_H_
- #define WIN32_LEAN_AND_MEAN
- #include <Windows.h>
- #include "Memory\Memory.h"
- #include "Graphics.h"
- class Application {
- public:
- Application();
- ~Application();
- bool Setup(LPCSTR appname, int width, int height, bool windowed, bool wireframe, int cmd, HINSTANCE instance);
- int Run();
- private:
- void Frame();
- bool IsOnlyInstance(LPCSTR);
- private:
- HWND m_pHwnd;
- Graphics *m_pGraphics;
- };
- #endif
- //Memory.h
- namespace Memory {
- template<class T> void Release(T&t)
- {
- if (t)
- {
- t->Release();
- t = nullptr;
- }
- }
- template<class T> void Delete(T&t)
- {
- if (t)
- {
- delete t;
- t = nullptr;
- }
- }
- template<class T> void DeleteArr(T&t)
- {
- if (t)
- {
- delete[] t;
- t = nullptr;
- }
- }
- }
- //Graphics.h
- #ifndef _GRAPHICS_H_
- #define _GRAPHICS_H_
- #include "Graphics3D.h"
- class Graphics : public Graphics3D {
- public:
- void Render();
- };
- #endif
- //Graphics3D.h
- #ifndef _GRAPHICS3D_H_
- #define _GRAPHICS3D_H_
- class Graphics3D {
- public:
- virtual void Render();
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement