C++ Game Framework  2013-06-04
CGF is a DirectX 11 game framework, built in C++ and DirectX 11. This is used to contain many to the DirectX functionality and wrap them into a framework to make game development easier.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CGF::D3DManager Class Reference

#include <D3DManager.h>

Public Member Functions

 D3DManager ()
 
 ~D3DManager ()
 
bool Initialize (int screenWidth, int screenHeight, bool vsync, HWND hwnd, bool fullscreen, float screenDepth, float screenNear)
 
void Shutdown ()
 
void BeginScene (float red, float green, float blue, float alpha)
 
void EndScene ()
 
void ZBuffer (const bool isSwitchedOn)
 
void AlphaBlending (const bool isSwitchedOn)
 
ID3D11Device * GetDevice ()
 
ID3D11DeviceContext * GetDeviceContext ()
 
XMMATRIX GetProjectionMatrix ()
 
XMMATRIX GetWorldMatrix ()
 
XMMATRIX GetOrthoMatrix ()
 
void GetVideoCardInfo (char *cardName, int &memory)
 

Constructor & Destructor Documentation

D3DManager::D3DManager ( )

Create an instance of the Direct3D Manager

D3DManager::~D3DManager ( )

Destruct this instance of the Direct3D Manager

Member Function Documentation

void D3DManager::AlphaBlending ( const bool  isTurnedOn)

Turn Alpha Blending on or off

Choose if you want Alpha Blending on or off

void D3DManager::BeginScene ( float  red,
float  green,
float  blue,
float  alpha 
)

Enable scene to start rendering to

Red colour value for the background Green colour value for the background Blue colour value for the background Alpha value for the background

void D3DManager::EndScene ( )

Finish scene rendering

ID3D11Device * D3DManager::GetDevice ( )

Get the current Direct3D device

ID3D11DeviceContext * D3DManager::GetDeviceContext ( )

Get the current device context

XMMATRIX D3DManager::GetOrthoMatrix ( )

Get the current orthographic matrix

XMMATRIX D3DManager::GetProjectionMatrix ( )

Get the current projection matrix

void D3DManager::GetVideoCardInfo ( char *  cardName,
int &  memory 
)

Get the video card info

Parameters
cardNameName of the graphics card
memoryAmount of memory, in MB, that this video card has
XMMATRIX D3DManager::GetWorldMatrix ( )

Get the current world matrix

bool D3DManager::Initialize ( int  screenWidth,
int  screenHeight,
bool  vsync,
HWND  hwnd,
bool  fullscreen,
float  screenDepth,
float  screenNear 
)

Initialize Direct3D

Parameters
screenWidthWidth of the window.
screenHeightHeight of the window
vsyncShould we VSync the graphics with the monitor?
hwndHandoe for the window to draw to
fullscreenIs the window fullscreen?
screenDepthDepth settings for our 3D environment that will be rendered in the window
screenNearDepth settings for our 3D environment that will be rendered in the window
void D3DManager::Shutdown ( )

Shutdown the Direct3D Manager, cleaning up memory

void D3DManager::ZBuffer ( const bool  isTurnedOn)

Turn the Z Buffer on or off

Choose if you want the Z Buffer on or off


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