Avionics
Dropship Simulator
Screen.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Page.h"
4 #include "WindowObject.h"
5 
6 class Screen
7 {
8 private:
9  Logger* logger = nullptr;
10  D3D10_VIEWPORT viewport;
11  WINDOW_OBJECT* pWindow = nullptr;
12  ID3DX10Font* pFont = nullptr;
13  ID3D10RasterizerState* state = nullptr;
14 
15 public:
16  int currentPage = 0;
17  std::vector<Page> pages;
18  D3DXMATRIX matProjection;
19  D3DXMATRIX matView;
20  bool initialized = false;
21 
23  std::string name;
24  UINT adapter, window;
25  bool flip = false;
26 
27  void Initialize(Logger*, WINDOW_OBJECT*, ID3DX10Font*);
28  void Render(float fElapsed);
29 
30  void Present() const
31  {
32  pWindow->pSwapChain->Present(0, 0);
33  }
34 
36  {
37  SAFE_RELEASE(state);
38  }
39 };
bool flip
Definition: Screen.h:25
Logger * logger
Definition: Screen.h:9
void DestroyDevice()
Definition: Screen.h:35
void Initialize(Logger *, WINDOW_OBJECT *, ID3DX10Font *)
Definition: Screen.cpp:3
D3DXMATRIX matView
Definition: Screen.h:19
Definition: Logger.h:5
Definition: Screen.h:6
ID3D10RasterizerState * state
Definition: Screen.h:13
void Render(float fElapsed)
Definition: Screen.cpp:52
IDXGISwapChain * pSwapChain
Definition: WindowObject.h:14
D3D10_VIEWPORT viewport
Definition: Screen.h:10
D3DXMATRIX matProjection
Definition: Screen.h:18
std::vector< Page > pages
Definition: Screen.h:17
ID3DX10Font * pFont
Definition: Screen.h:12
std::string name
config items
Definition: Screen.h:23
bool initialized
Definition: Screen.h:20
UINT adapter
Definition: Screen.h:24
int currentPage
Definition: Screen.h:16
UINT window
Definition: Screen.h:24
WINDOW_OBJECT * pWindow
Definition: Screen.h:11
void Present() const
Definition: Screen.h:30