75 lines
1.8 KiB
C
75 lines
1.8 KiB
C
#pragma once
|
|
|
|
#include "Resource.h"
|
|
|
|
|
|
struct ViewPort
|
|
{
|
|
ViewPort()
|
|
: m_TopLeftX(0)
|
|
, m_TopLeftY(0)
|
|
, m_Width(0)
|
|
, m_Height(0)
|
|
, m_MinDepth(0.0f)
|
|
, m_MaxDepth(1.0f)
|
|
{
|
|
}
|
|
|
|
int m_TopLeftX;
|
|
int m_TopLeftY;
|
|
uint32 m_Width;
|
|
uint32 m_Height;
|
|
float m_MinDepth;
|
|
float m_MaxDepth;
|
|
};
|
|
|
|
struct BindFlags
|
|
{
|
|
enum Enumeration
|
|
{
|
|
ClearDepthStencil = 0x001,
|
|
ClearColor = 0x002,
|
|
ClearAll = 0x00F,
|
|
BindAdditionalTexture0 = 0x010,
|
|
BindAdditionalTexture1 = 0x020,
|
|
BindAdditionalTexture2 = 0x040,
|
|
BindAdditionalTexture3 = 0x080,
|
|
BindBaseTexture = 0x100,
|
|
BindAllTextures = 0xFF0,
|
|
Default = ClearAll | BindAllTextures
|
|
};
|
|
};
|
|
|
|
struct __declspec(novtable) IRenderTargetBase
|
|
{
|
|
virtual ~IRenderTargetBase() {}
|
|
|
|
virtual void set_ClearDepth(float argValue) = 0;
|
|
virtual float get_ClearDepth() const = 0;
|
|
|
|
virtual void set_ClearStencil(unsigned char argValue) = 0;
|
|
virtual unsigned char get_ClearStencil() const = 0;
|
|
|
|
virtual void set_ClearColor(const D3DXCOLOR& argValue) = 0;
|
|
virtual D3DXCOLOR get_ClearColor() const = 0;
|
|
|
|
virtual void set_ViewPort(const ViewPort& argValue) = 0;
|
|
virtual ViewPort get_ViewPort() const = 0;
|
|
|
|
virtual uint32 get_RenderTargetWidth() const = 0;
|
|
virtual uint32 get_RenderTargetHeight() const = 0;
|
|
virtual DataFormat::Enumeration get_RenderTargetFormat() const = 0;
|
|
|
|
virtual void set_HasDepthStencilBuffer(bool argState) = 0;
|
|
virtual bool get_HasDepthStencilBuffer() const = 0;
|
|
|
|
virtual void AddAdditionalRenderTarget(IRenderTargetBase& argTarget) = 0;
|
|
virtual void RemoveAdditionalRenderTarget(IRenderTargetBase& argTarget) = 0;
|
|
|
|
virtual ID3D10RenderTargetView* get_DX10RenderTargetView() const = 0;
|
|
virtual ID3D10DepthStencilView* get_DX10DepthStencilView() const = 0;
|
|
|
|
virtual void Bind(DWORD argBindFlags = BindFlags::Default) = 0;
|
|
virtual void UnbindAllRenderTargets() = 0;
|
|
};
|