Files
khaotic-engine-Reborn/enginecustom/src/inc/system/render_texture_class.h
CatChow0 2b8e222d7c Patch - Refactors logging and adds macro header - V14.5.29
This commit refactors the logging system by replacing direct calls to the Logger class with macros. This improves code readability and maintainability by providing a consistent and concise way to log messages throughout the engine.

The 'macro.h' header file is added and included in multiple system classes to define these logging macros, centralizing logging functionality.

Additionally, error handling is improved in imguiManager::IncrementBuildVersionInConfig by logging specific errors during file operations.
2025-10-09 18:47:33 +02:00

55 lines
1.5 KiB
C++

////////////////////////////////////////////////////////////////////////////////
// Filename: rendertextureclass.h
////////////////////////////////////////////////////////////////////////////////
#ifndef _RENDERTEXTURECLASS_H_
#define _RENDERTEXTURECLASS_H_
//////////////
// INCLUDES //
//////////////
#include "Logger.h"
#include <d3d11.h>
#include <directxmath.h>
#include "macro.h"
using namespace DirectX;
////////////////////////////////////////////////////////////////////////////////
// Class name: render_texture_class
////////////////////////////////////////////////////////////////////////////////
class render_texture_class
{
public:
render_texture_class();
render_texture_class(const render_texture_class&);
~render_texture_class();
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