Avionics
Dropship Simulator
Viewport Class Reference

#include <Viewport.h>

Collaboration diagram for Viewport:
[legend]

Classes

struct  ADAPTER_OBJECT
 

Public Member Functions

 Viewport (Bus *, Logger *)
 
void Initialize (HINSTANCE)
 
std::vector< HWND > GetWindowHandles () const
 
void Destroy ()
 
 ~Viewport ()
 
void Render (float fElapsed)
 
void FrameMove ()
 

Public Attributes

bool exclusiveMode = false
 
std::vector< Screenscreens
 
std::vector< Fontfonts
 

Private Member Functions

 Viewport ()=default
 
HRESULT EnumerateAdapters ()
 
HRESULT CreateWindowClass (HINSTANCE hInstance)
 
HRESULT CreateMonitorWindows ()
 
HRESULT SetWindowAssociation () const
 
HRESULT CreateDevicePerAdapter (D3D10_DRIVER_TYPE DriverType)
 
HRESULT OnD3D10CreateDevice (DEVICE_OBJECT *pDevice)
 
HRESULT CreateSwapChainPerOutput () const
 
void DeviceCleanup ()
 

Static Private Member Functions

static HRESULT EnumerateOutputs (ADAPTER_OBJECT *pAdapterObj)
 
static HRESULT CreateViewsForWindowObject (WINDOW_OBJECT *pWindow)
 

Private Attributes

Busbus = nullptr
 
Loggerlogger = nullptr
 
WNDCLASS g_WindowClass
 
IDXGIFactory * g_pDXGIFactory = nullptr
 
CGrowableArray< DEVICE_OBJECT * > g_DeviceArray
 
CGrowableArray< ADAPTER_OBJECT * > g_AdapterArray
 
CGrowableArray< WINDOW_OBJECT * > g_WindowObjects
 

Detailed Description

Definition at line 7 of file Viewport.h.

Constructor & Destructor Documentation

◆ Viewport() [1/2]

Viewport::Viewport ( )
privatedefault

◆ Viewport() [2/2]

Viewport::Viewport ( Bus prmBus,
Logger prmLogger 
)

Definition at line 3 of file Viewport.cpp.

◆ ~Viewport()

Viewport::~Viewport ( )

Definition at line 84 of file Viewport.cpp.

Member Function Documentation

◆ CreateDevicePerAdapter()

HRESULT Viewport::CreateDevicePerAdapter ( D3D10_DRIVER_TYPE  DriverType)
private

this guy creates a couple of memory leaks, you can't clean him up here without killing the reference in pWindow

Definition at line 305 of file Viewport.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateMonitorWindows()

HRESULT Viewport::CreateMonitorWindows ( )
private

Definition at line 228 of file Viewport.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateSwapChainPerOutput()

HRESULT Viewport::CreateSwapChainPerOutput ( ) const
private

Definition at line 352 of file Viewport.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateViewsForWindowObject()

HRESULT Viewport::CreateViewsForWindowObject ( WINDOW_OBJECT pWindow)
staticprivate

Definition at line 416 of file Viewport.cpp.

Here is the caller graph for this function:

◆ CreateWindowClass()

HRESULT Viewport::CreateWindowClass ( HINSTANCE  hInstance)
private

Definition at line 196 of file Viewport.cpp.

Here is the caller graph for this function:

◆ Destroy()

void Viewport::Destroy ( )

Definition at line 532 of file Viewport.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DeviceCleanup()

void Viewport::DeviceCleanup ( )
private

Definition at line 481 of file Viewport.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EnumerateAdapters()

HRESULT Viewport::EnumerateAdapters ( )
private

this guy creates a memory leak but you can't delete him without removing the reference and he is getting cleaned up on DeviceCleanup

Definition at line 91 of file Viewport.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EnumerateOutputs()

HRESULT Viewport::EnumerateOutputs ( ADAPTER_OBJECT pAdapterObj)
staticprivate

Definition at line 157 of file Viewport.cpp.

Here is the caller graph for this function:

◆ FrameMove()

void Viewport::FrameMove ( )
inline

look at commandstream

look at screens

update page

Definition at line 51 of file Viewport.h.

Here is the caller graph for this function:

◆ GetWindowHandles()

std::vector< HWND > Viewport::GetWindowHandles ( ) const

Definition at line 570 of file Viewport.cpp.

Here is the caller graph for this function:

◆ Initialize()

void Viewport::Initialize ( HINSTANCE  hInstance)

Definition at line 9 of file Viewport.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnD3D10CreateDevice()

HRESULT Viewport::OnD3D10CreateDevice ( DEVICE_OBJECT pDevice)
private

Definition at line 394 of file Viewport.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Render()

void Viewport::Render ( float  fElapsed)

Definition at line 65 of file Viewport.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetWindowAssociation()

HRESULT Viewport::SetWindowAssociation ( ) const
private

Definition at line 291 of file Viewport.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ bus

Bus* Viewport::bus = nullptr
private

Definition at line 10 of file Viewport.h.

◆ exclusiveMode

bool Viewport::exclusiveMode = false

Definition at line 39 of file Viewport.h.

◆ fonts

std::vector<Font> Viewport::fonts

Definition at line 41 of file Viewport.h.

◆ g_AdapterArray

CGrowableArray<ADAPTER_OBJECT*> Viewport::g_AdapterArray
private

Definition at line 26 of file Viewport.h.

◆ g_DeviceArray

CGrowableArray<DEVICE_OBJECT*> Viewport::g_DeviceArray
private

Definition at line 25 of file Viewport.h.

◆ g_pDXGIFactory

IDXGIFactory* Viewport::g_pDXGIFactory = nullptr
private

Definition at line 16 of file Viewport.h.

◆ g_WindowClass

WNDCLASS Viewport::g_WindowClass
private

Definition at line 15 of file Viewport.h.

◆ g_WindowObjects

CGrowableArray<WINDOW_OBJECT*> Viewport::g_WindowObjects
private

Definition at line 27 of file Viewport.h.

◆ logger

Logger* Viewport::logger = nullptr
private

Definition at line 11 of file Viewport.h.

◆ screens

std::vector<Screen> Viewport::screens

Definition at line 40 of file Viewport.h.


The documentation for this class was generated from the following files: