-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraphicsClass.cpp
More file actions
38 lines (31 loc) · 827 Bytes
/
GraphicsClass.cpp
File metadata and controls
38 lines (31 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "GraphicsClass.h"
GraphicsClass::GraphicsClass() {
m_D3D = nullptr;
}
GraphicsClass::~GraphicsClass() {}
bool GraphicsClass::Initialize( int ScreenWidth, int ScreenHeight, HWND hWnd ) {
bool result;
m_D3D = new D3DClass;
if ( !m_D3D ) return false;
result = m_D3D->Initialize( ScreenWidth, ScreenHeight, VSyncEnabled, hWnd, FullScreen, ScreenDepth, ScreenNear );
if (!result ) return false;
return true;
}
void GraphicsClass::Shutdown() {
if ( m_D3D ) {
m_D3D->Shutdown();
delete m_D3D;
m_D3D = nullptr;
}
}
bool GraphicsClass::Frame() {
bool result;
result = Render();
if ( !result ) return false;
return true;
}
bool GraphicsClass::Render() {
m_D3D->BeginScene( 0.5f, 0.5f, 0.5f, 1.0f );
m_D3D->EndScene();
return true;
}