1
0
mirror of https://github.com/Halofreak1990/XFXFramework synced 2024-12-26 13:49:34 +01:00
XFXFramework/include/GraphicsDeviceManager.h
Halofreak1990 1c277b2038 Fixed a couple of errors, removed Dictionary references from the ContentManager to get it to compile.
Now, the only thing keeping XFX from a full compile is my stupid attempt at Asynchronous IO. Will look at that, but most likely, I will comment it out and just get a new Demo out before New Year.
2010-12-27 01:01:25 +00:00

73 lines
2.3 KiB
C++

/********************************************************
* GraphicsDeviceManager.h *
* *
* XFX GraphicsDeviceManager definition file *
* Copyright © XFX Team. All Rights Reserved *
********************************************************/
#ifndef _XFX_GRAPHICSDEVICEMANAGER_
#define _XFX_GRAPHICSDEVICEMANAGER_
#include "Game.h"
#include "Graphics/GraphicsDevice.h"
#include "GraphicsDeviceInformation.h"
#include "Interfaces.h"
#include "Graphics/IGraphicsDeviceService.h"
#include "Graphics/Enums.h"
#include "System/Interfaces.h"
using namespace System;
using namespace XFX::Graphics;
namespace XFX
{
class GraphicsDeviceManager : public IGraphicsDeviceService, public IDisposable, public IGraphicsDeviceManager, virtual Object
{
private:
bool isFullScreen;
Game _game;
GraphicsDevice graphicsDevice;
protected:
virtual bool CanResetDevice(GraphicsDeviceInformation newDeviceInfo);
virtual void Dispose(int disposing);
virtual GraphicsDeviceInformation FindBestDevice(bool anySuitableDevice);
virtual void OnDeviceCreated(Object* sender, EventArgs args);
virtual void OnDeviceDisposing(Object* sender, EventArgs args);
virtual void OnDeviceReset(Object* sender, EventArgs args);
virtual void OnDeviceResetting(Object* sender, EventArgs args);
virtual void RankDevices(List<GraphicsDeviceInformation> foundDevices);
public:
GraphicsDevice GraphicsDevice_();
bool IsFullScreen();
float MinimumPixelShaderProfile;
float MinimumVertexShaderProfile;
int PreferMultiSampling;
SurfaceFormat_t PreferredBackBufferFormat;
int PreferredBackBufferWidth;
int PreferredBackBufferHeight;
DepthFormat_t PreferredDepthStencilFormat;
int SynchronizeWithVerticalRetrace;
static const int DefaultBackBufferWidth;
static const int DefaultBackBufferHeight;
static SurfaceFormat_t ValidAdapterFormats[];
static SurfaceFormat_t ValidBackBufferFormats[];
static const DeviceType_t ValidDeviceTypes[];
GraphicsDeviceManager(Game game);
EventHandler DeviceCreated;
EventHandler DeviceDisposing;
EventHandler DeviceReset;
EventHandler DeviceResetting;
EventHandler Disposed;
void ApplyChanges();
void Dispose();
void ToggleFullscreen();
};
}
#endif //_XFX_GRAPHICSDEVICEMANAGER_