All pastes #1736634 Raw Edit

Miscellany

public cpp v1 · immutable
#1736634 ·published 2010-01-03 21:09 UTC
rendered paste body
#ifndef DEVICE_H_#define DEVICE_H_#include <D3DX10.h>#include <D3D10.h>#include <DXGI.h>#define RELEASE(x) if(x != 0){ x->Release(); x = 0; }class Shader;class RenderUnit;/* CLASS Device */class Device{	protected:		ID3D10Device*				pDevice;	private:		ID3D10RenderTargetView*		pRenderTargetView;		ID3D10DepthStencilView*		pDepthStencilView;		IDXGISwapChain*				pSwapChain;		BOOL						bDeviceActive;		struct _states		{			BOOL	bReady;			BOOL	bCleared;		}							sStates;	public:									Device				(	void														);									~Device				(	void														);		void						Invalidate			(	void														);		bool						Create				(	HWND hOutput, HINSTANCE hInstance, 															unsigned uiWidth, unsigned uiHeight							);		void						Destroy				(	void														);		void						Render				(	void														);			/* RENDER TARGET OPTIONS */		void						RTClear				(	float r = 0.0f, float g = 0.0f, 															float b = 0.0f, float a = 0.0f								);		void						RTPresent			(	void														);		/* PROTECTED CLASSES */		Shader*						LoadShader			(	LPCSTR Filename												);		RenderUnit*					CreateRenderUnit	(	void														);	protected:		bool						CreateDS			(	void														);		bool						CreateRT			(	void														);		void						SetViewport			(	float min_depth, float max_depth, 															unsigned uiWidth, unsigned uiHeight							);} /* class Device */;#endif /* DEVICE_H_ */