render to texture sans modif applicationclass.cpp
This commit is contained in:
51
enginecustom/rendertextureclass.h
Normal file
51
enginecustom/rendertextureclass.h
Normal file
@@ -0,0 +1,51 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Filename: rendertextureclass.h
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef _RENDERTEXTURECLASS_H_
|
||||
#define _RENDERTEXTURECLASS_H_
|
||||
|
||||
|
||||
//////////////
|
||||
// INCLUDES //
|
||||
//////////////
|
||||
#include <d3d11.h>
|
||||
#include <directxmath.h>
|
||||
using namespace DirectX;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Class name: RenderTextureClass
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
class RenderTextureClass
|
||||
{
|
||||
public:
|
||||
RenderTextureClass();
|
||||
RenderTextureClass(const RenderTextureClass&);
|
||||
~RenderTextureClass();
|
||||
|
||||
bool Initialize(ID3D11Device*, int, int, float, float, int);
|
||||
void Shutdown();
|
||||
|
||||
void SetRenderTarget(ID3D11DeviceContext*);
|
||||
void ClearRenderTarget(ID3D11DeviceContext*, float, float, float, float);
|
||||
ID3D11ShaderResourceView* GetShaderResourceView();
|
||||
|
||||
void GetProjectionMatrix(XMMATRIX&);
|
||||
void GetOrthoMatrix(XMMATRIX&);
|
||||
|
||||
int GetTextureWidth();
|
||||
int GetTextureHeight();
|
||||
|
||||
private:
|
||||
int m_textureWidth, m_textureHeight;
|
||||
ID3D11Texture2D* m_renderTargetTexture;
|
||||
ID3D11RenderTargetView* m_renderTargetView;
|
||||
ID3D11ShaderResourceView* m_shaderResourceView;
|
||||
ID3D11Texture2D* m_depthStencilBuffer;
|
||||
ID3D11DepthStencilView* m_depthStencilView;
|
||||
D3D11_VIEWPORT m_viewport;
|
||||
XMMATRIX m_projectionMatrix;
|
||||
XMMATRIX m_orthoMatrix;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user