3DRadSpace 0.1.0Alpha
3DRadSpace is a free, simple to use, rapid application development game engine.
Loading...
Searching...
No Matches
Engine3DRadSpace.Graphics.IGraphicsDevice Class Referenceabstract

#include <IGraphicsDevice.hpp>

Inheritance diagram for Engine3DRadSpace.Graphics.IGraphicsDevice:
Collaboration diagram for Engine3DRadSpace.Graphics.IGraphicsDevice:

Public Member Functions

string BackendName ()
IDepthStencilState GetDepthStencilState ()
IRasterizerState GetRasterizerState ()
Point GetResolution ()
IRenderTarget GetBackBuffer ()
ITexture2D GetBackBufferTexture ()
IDepthStencilBuffer GetDepthBuffer ()
IBlendState CreateBlendState (bool alphaCoverage, bool indepedentBlend, RenderTargetBlendState[] renderTargetBlendStates)
IBlendState CreateBlendState_Opaque ()
IBlendState CreateBlendState_AlphaBlend ()
IBlendState CreateBlendState_Additive ()
IBlendState CreateBlendState_NonPremultiplied ()
IDepthStencilBuffer CreateDepthStencilBuffer (ulong x, ulong y)
IDepthStencilState CreateDepthStencilState (bool EnableDepth, DepthWriteMask Mask, ComparisonFunction Function, bool EnableStencil, byte ReadMask, byte WriteMask, FaceOperation FrontFace, FaceOperation BackFace)
IDepthStencilState CreateDepthStencilState_DepthDefault ()
IDepthStencilState CreateDepthStencilState_DepthNone ()
IDepthStencilState CreateDepthStencilState_DepthRead ()
IDepthStencilState CreateDepthStencilState_DepthReverseZ ()
IDepthStencilState CreateDepthStencilState_DepthReadReverseZ ()
IShaderCompiler ShaderCompiler ()
ITexture2D WhiteBlank ()
 Returns a white blank texture.
IVertexBuffer GetScreenQuad ()
IIndexBuffer CreateIndexBuffer (Span< uint > indices)
IIndexBuffer CreateIndexBuffer (ulong numIndices, BufferUsage usage)
IRasterizerState CreateRasterizerState (RasterizerFillMode filling=RasterizerFillMode.Solid, RasterizerCullMode culling=RasterizerCullMode.CullBack, bool switchFrontBack=false, int depthBias=0, float depthBiasClamp=0, float slopeScaleDepthBias=0, bool depthClip=false, bool scissor=false, bool multisample=false, bool aaLine=false)
IRasterizerState CreateRasterizerState_CullNone ()
IRasterizerState CreateRasterizerState_CullClockwise ()
IRasterizerState CreateRasterizerState_CullCounterClockwise ()
IRasterizerState CreateRasterizerState_Wireframe ()
IRenderTarget CreateRenderTarget (ulong x, ulong y, PixelFormat format)
ISamplerState CreateSamplerState ()
ISamplerState CreateSamplerState (TextureFilter filter, TextureAddressMode addressU, TextureAddressMode addressV, TextureAddressMode addressW, float mipLODBias, uint maxAnisotropy, ComparisonFunction comparisonFunc, Math.Color borderColor, float minLOD, float maxLOD)
ISamplerState CreateSamplerState_LinearClamp ()
ISamplerState CreateSamplerState_LinearWrap ()
ISamplerState CreateSamplerState_PointClamp ()
ISamplerState CreateSamplerState_PointWrap ()
ISamplerState CreateSamplerState_AnisotropicClamp ()
ISamplerState CreateSamplerState_AnisotropicWrap ()
ITexture1D CreateTexture1D (ulong size, BufferUsage usage)
ITexture1D CreateTexture1D (Span< Math.Color > colors)
ITexture2D CreateTexture2D (IntPtr data, ulong x, ulong y, PixelFormat format, BufferUsage usage)
ITexture2D CreateTexture2D (string path)
ITextureCube CreateTextureCube (ITexture2D[] cubeMap)
ITextureCube CreateTextureCube (string path)
ITexture3D CreateTexture3D (ITexture3D[] textures)
IVertexBuffer CreateVertexBuffer (IntPtr data, ulong structSize, ulong numVertices, BufferUsage usage)
IGraphicsCommandList CreateCommandList ()
IGraphicsCommandList ImmediateContext ()
IntPtr NativeHandle ()
virtual std::string_view BackendName () const noexcept=0
virtual std::unique_ptr< IDepthStencilState > GetDepthStencilState ()=0
 Gets the depth stencil buffer that's currently set.
virtual std::unique_ptr< IRasterizerState > GetRasterizerState ()=0
 Gets the current blend state.
virtual Math::Point Resolution () const noexcept=0
 Gets the backbuffer size.
virtual IRenderTarget * GetBackBuffer () const noexcept=0
 Gets the backbuffer render target view.
virtual ITexture2D * GetBackBufferTexture () const noexcept=0
 Gets the backbuffer texture.
virtual IDepthStencilBuffer & GetDepthBuffer ()=0
 Gets the default depth stencil buffer.
virtual std::unique_ptr< IBlendState > CreateBlendState (bool alphaCoverage, bool indepedentBlend, std::array< RenderTargetBlendState, 8 > renderTargetBlendStates)=0
 Creates a new blend state.
virtual std::unique_ptr< IBlendState > CreateBlendState_Opaque ()=0
 Creates a new opaque blend state.
virtual std::unique_ptr< IBlendState > CreateBlendState_AlphaBlend ()=0
 Creates a new alpha blend state.
virtual std::unique_ptr< IBlendState > CreateBlendState_Additive ()=0
 Creates a new additive blend state.
virtual std::unique_ptr< IBlendState > CreateBlendState_NonPremultiplied ()=0
 Creates a new non-premultiplied blend state.
virtual std::unique_ptr< IDepthStencilBuffer > CreateDepthStencilBuffer (size_t x, size_t y)=0
 Creates a new depth stencil buffer with the specified dimensions.
virtual std::unique_ptr< IDepthStencilState > CreateDepthStencilState (bool EnableDepth, DepthWriteMask Mask, ComparisonFunction Function, bool EnableStencil, uint8_t ReadMask, uint8_t WriteMask, FaceOperation FrontFace, FaceOperation BackFace)=0
 Creates a new depth stencil state with the specified parameters.
virtual std::unique_ptr< IDepthStencilState > CreateDepthStencilState_DepthDefault ()=0
 Creates a new default depth stencil state with depth testing enabled, depth writes enabled, and the comparison function set to less than or equal.
virtual std::unique_ptr< IDepthStencilState > CreateDepthStencilState_DepthNone ()=0
 Creates a new depth stencil state with depth testing disabled and depth writes disabled.
virtual std::unique_ptr< IDepthStencilState > CreateDepthStencilState_DepthRead ()=0
 Creates a new depth stencil state with depth testing enabled, depth writes disabled, and the comparison function set to less than or equal.
virtual std::unique_ptr< IDepthStencilState > CreateDepthStencilState_DepthReverseZ ()=0
 Creates a new depth stencil state with depth testing enabled, depth writes enabled, and the comparison function set to greater than or equal.
virtual std::unique_ptr< IDepthStencilState > CreateDepthStencilState_DepthReadReverseZ ()=0
 Creates a new depth stencil state with depth testing enabled, depth writes disabled, and the comparison function set to greater than or equal.
virtual IShaderCompiler * ShaderCompiler ()=0
 Gets the associated shader compiler class.
virtual ITexture2D * WhiteBlank ()=0
virtual IVertexBuffer * GetScreenQuad () const noexcept=0
 Gets an vertex buffer that covers the entire backbuffer.
virtual std::unique_ptr< IIndexBuffer > CreateIndexBuffer (std::span< unsigned > indices)=0
 Creates a new index buffer from the specified indices.
virtual std::unique_ptr< IIndexBuffer > CreateIndexBuffer (size_t numIndices, BufferUsage usage)=0
 Creates a new index buffer with data not set.
virtual std::unique_ptr< IRasterizerState > CreateRasterizerState (RasterizerFillMode filling=RasterizerFillMode::Solid, RasterizerCullMode culling=RasterizerCullMode::CullBack, bool switchFrontBack=false, int depthBias=0, float depthBiasClamp=0, float slopeScaleDepthBias=0, bool depthClip=false, bool scissor=false, bool multisample=false, bool aaLine=false)=0
 Creates a new rasterizer state with the specified parameters.
virtual std::unique_ptr< IRasterizerState > CreateRasterizerState_CullNone ()=0
 Creates a new rasterizer state with culling disabled.
virtual std::unique_ptr< IRasterizerState > CreateRasterizerState_CullClockwise ()=0
 Creates a new rasterizer state with clockwise culling.
virtual std::unique_ptr< IRasterizerState > CreateRasterizerState_CullCounterClockwise ()=0
 Creates a new rasterizer state with counter-clockwise culling.
virtual std::unique_ptr< IRasterizerState > CreateRasterizerState_Wireframe ()=0
 Creates a new rasterizer state with wireframe fill mode.
virtual std::unique_ptr< IRenderTarget > CreateRenderTarget (size_t x, size_t y, PixelFormat format)=0
 Creates a new render target with the specified dimensions and pixel format.
virtual std::unique_ptr< ISamplerState > CreateSamplerState ()=0
 Creates a new texture sampler state with default parameters.
virtual std::unique_ptr< ISamplerState > CreateSamplerState (TextureFilter filter, TextureAddressMode addressU, TextureAddressMode addressV, TextureAddressMode addressW, float mipLODBias, unsigned maxAnisotropy, ComparisonFunction comparisonFunc, const Math::Color &borderColor, float minLOD, float maxLOD)=0
 Creates a new texture sampler state with the specified parameters.
virtual std::unique_ptr< ISamplerState > CreateSamplerState_LinearClamp ()=0
 Creates a new sampler state using linear filtering with clamp addressing on all axes.
virtual std::unique_ptr< ISamplerState > CreateSamplerState_LinearWrap ()=0
 Creates a new sampler state using linear filtering with wrap addressing on all axes.
virtual std::unique_ptr< ISamplerState > CreateSamplerState_PointClamp ()=0
 Creates a new sampler state using point filtering with clamp addressing on all axes.
virtual std::unique_ptr< ISamplerState > CreateSamplerState_PointWrap ()=0
 Creates a new sampler state using point filtering with wrap addressing on all axes.
virtual std::unique_ptr< ISamplerState > CreateSamplerState_AnisotropicClamp ()=0
 Creates a new sampler state using anisotropic filtering with clamp addressing on all axes.
virtual std::unique_ptr< ISamplerState > CreateSamplerState_AnisotropicWrap ()=0
 Creates a new sampler state using anisotropic filtering with wrap addressing on all axes.
virtual std::unique_ptr< ITexture1D > CreateTexture1D (size_t numElements, PixelFormat format)=0
 Creates a new 1D texture with the specified number of elements and pixel format.
virtual std::unique_ptr< ITexture1D > CreateTexture1D (std::span< Math::Color > colors)=0
 Creates a new 1D texture initialized with the specified colors.
virtual std::unique_ptr< ITexture2D > CreateTexture2D (void *data, size_t x, size_t y, PixelFormat format, BufferUsage usage)=0
 Creates a new 2D texture with the specified dimensions, pixel format, and initial data.
virtual std::unique_ptr< ITexture2D > CreateTexture2D (const std::filesystem::path &path)=0
 Creates a new 2D texture by loading it from an image file.
virtual std::unique_ptr< IVertexBuffer > CreateVertexBuffer (const void *data, size_t structSize, size_t numVertices, BufferUsage usage)=0
 Creates a new vertex buffer from raw vertex data.
virtual std::unique_ptr< ITextureCube > CreateTextureCube (const std::filesystem::path &path)=0
 Creates a new cube texture by loading it from a file.
virtual std::unique_ptr< ITextureCube > CreateTextureCube (std::array< ITexture2D *, 6 > cubeMap)=0
 Creates a new cube texture from six individual 2D textures, one for each face.
virtual std::unique_ptr< ITexture3D > CreateTexture3D (std::span< ITexture2D * > textures)=0
 Creates a new 3D texture from a span of 2D textures, each representing a depth slice.
template<VertexDecl V>
std::unique_ptr< IVertexBuffer > CreateVertexBuffer (std::span< const V > vertices, BufferUsage usage)
 Creates a new vertex buffer from a span of strongly-typed, const vertices.
template<VertexDecl V>
std::unique_ptr< IVertexBuffer > CreateVertexBuffer (std::span< V > vertices, BufferUsage usage)
 Creates a new vertex buffer from a span of strongly-typed vertices.
template<VertexDecl V>
std::unique_ptr< IVertexBuffer > CreateVertexBuffer (size_t numVertices, BufferUsage usage)
 Creates a new, uninitialized vertex buffer sized for the specified strongly-typed vertex count.
virtual std::unique_ptr< IGraphicsCommandList > CreateCommandList ()=0
 Creates a new deferred graphics command list for recording rendering commands.
virtual IGraphicsCommandList * ImmediateContext ()=0
 Gets the immediate graphics command list associated with this device.
virtual void * NativeHandle () const noexcept=0
 Gets the underlying native handle of this graphics device (e.g. an ID3D11Device pointer).
virtual ~IGraphicsDevice () override=default
Public Member Functions inherited from Engine3DRadSpace.IService
IGame * GetOwner () const noexcept
 Gets the owner of this instance.
virtual ~IService ()=default

Public Attributes

bool EnableVSync = true

Protected Member Functions

 IGraphicsDevice ()=default
 IGraphicsDevice (const IGraphicsDevice &)=delete
IGraphicsDevice & operator= (const IGraphicsDevice &)=delete
 IGraphicsDevice (IGraphicsDevice &&) noexcept=default
IGraphicsDevice & operator= (IGraphicsDevice &&) noexcept=default
Protected Member Functions inherited from Engine3DRadSpace.IService
 IService ()
 IService (IGame *owner)
 IService (const IService &)=delete
IService & operator= (const IService &)=delete
 IService (IService &&) noexcept=default
IService & operator= (IService &&) noexcept=default

Additional Inherited Members

Protected Attributes inherited from Engine3DRadSpace.IService
IGame * _owner = nullptr
Properties inherited from Engine3DRadSpace.IPtrWrapper
IntPtr Handle [get]
Properties inherited from Engine3DRadSpace.IService
IGame Owner [get]

Constructor & Destructor Documentation

◆ IGraphicsDevice() [1/3]

Engine3DRadSpace.Graphics.IGraphicsDevice.IGraphicsDevice ( )
protecteddefault

◆ IGraphicsDevice() [2/3]

Engine3DRadSpace.Graphics.IGraphicsDevice.IGraphicsDevice ( const IGraphicsDevice & )
protecteddelete

◆ IGraphicsDevice() [3/3]

Engine3DRadSpace.Graphics.IGraphicsDevice.IGraphicsDevice ( IGraphicsDevice && )
protecteddefaultnoexcept

◆ ~IGraphicsDevice()

virtual Engine3DRadSpace.Graphics.IGraphicsDevice.~IGraphicsDevice ( )
overridevirtualdefault

Member Function Documentation

◆ BackendName() [1/2]

string Engine3DRadSpace.Graphics.IGraphicsDevice.BackendName ( )

◆ BackendName() [2/2]

◆ CreateBlendState() [1/2]

IBlendState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateBlendState ( bool alphaCoverage,
bool indepedentBlend,
RenderTargetBlendState[] renderTargetBlendStates )

◆ CreateBlendState() [2/2]

virtual std::unique_ptr< IBlendState > Engine3DRadSpace.Graphics.IGraphicsDevice.CreateBlendState ( bool alphaCoverage,
bool indepedentBlend,
std::array< RenderTargetBlendState, 8 > renderTargetBlendStates )
pure virtual

Creates a new blend state.

Parameters
alphaCoverageIndicates whether alpha coverage is enabled.
indepedentBlendIndicates whether independent blend is enabled.
renderTargetBlendStatesArray of render target blend states.
Returns
Unique pointer to the created blend state.

Implemented in Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateBlendState_Additive() [1/2]

IBlendState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateBlendState_Additive ( )

◆ CreateBlendState_Additive() [2/2]

Creates a new additive blend state.

Returns
Unique pointer to the created blend state.

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateBlendState_AlphaBlend() [1/2]

IBlendState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateBlendState_AlphaBlend ( )

◆ CreateBlendState_AlphaBlend() [2/2]

Creates a new alpha blend state.

Returns
Unique pointer to the created blend state.

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateBlendState_NonPremultiplied() [1/2]

IBlendState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateBlendState_NonPremultiplied ( )

◆ CreateBlendState_NonPremultiplied() [2/2]

Creates a new non-premultiplied blend state.

Returns
Unique pointer to the created blend state.

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateBlendState_Opaque() [1/2]

IBlendState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateBlendState_Opaque ( )

◆ CreateBlendState_Opaque() [2/2]

Creates a new opaque blend state.

Returns
Unique pointer to the created blend state.

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateCommandList() [1/2]

IGraphicsCommandList Engine3DRadSpace.Graphics.IGraphicsDevice.CreateCommandList ( )

◆ CreateCommandList() [2/2]

Creates a new deferred graphics command list for recording rendering commands.

Returns
Unique pointer to the created graphics command list

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateDepthStencilBuffer() [1/2]

IDepthStencilBuffer Engine3DRadSpace.Graphics.IGraphicsDevice.CreateDepthStencilBuffer ( ulong x,
ulong y )

◆ CreateDepthStencilBuffer() [2/2]

virtual std::unique_ptr< IDepthStencilBuffer > Engine3DRadSpace.Graphics.IGraphicsDevice.CreateDepthStencilBuffer ( size_t x,
size_t y )
pure virtual

Creates a new depth stencil buffer with the specified dimensions.

Parameters
xThe width of the depth stencil buffer.
yThe height of the depth stencil buffer.
Returns
Unique pointer to the created depth stencil buffer.

Implemented in Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateDepthStencilState() [1/2]

IDepthStencilState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateDepthStencilState ( bool EnableDepth,
DepthWriteMask Mask,
ComparisonFunction Function,
bool EnableStencil,
byte ReadMask,
byte WriteMask,
FaceOperation FrontFace,
FaceOperation BackFace )

◆ CreateDepthStencilState() [2/2]

virtual std::unique_ptr< IDepthStencilState > Engine3DRadSpace.Graphics.IGraphicsDevice.CreateDepthStencilState ( bool EnableDepth,
DepthWriteMask Mask,
ComparisonFunction Function,
bool EnableStencil,
uint8_t ReadMask,
uint8_t WriteMask,
FaceOperation FrontFace,
FaceOperation BackFace )
pure virtual

Creates a new depth stencil state with the specified parameters.

Parameters
EnableDepthIndicates whether depth testing is enabled.
MaskSpecifies the depth write mask.
FunctionSpecifies the depth comparison function.
EnableStencilIndicates whether stencil testing is enabled.
ReadMaskSpecifies the stencil read mask.
WriteMaskSpecifies the stencil write mask.
FrontFaceSpecifies the stencil operations for front-facing polygons.
BackFaceSpecifies the stencil operations for back-facing polygons.
Returns
Unique pointer to the created depth stencil state.

Implemented in Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateDepthStencilState_DepthDefault() [1/2]

IDepthStencilState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateDepthStencilState_DepthDefault ( )

◆ CreateDepthStencilState_DepthDefault() [2/2]

Creates a new default depth stencil state with depth testing enabled, depth writes enabled, and the comparison function set to less than or equal.

Returns
Unique pointer to the created depth stencil state.

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateDepthStencilState_DepthNone() [1/2]

IDepthStencilState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateDepthStencilState_DepthNone ( )

◆ CreateDepthStencilState_DepthNone() [2/2]

Creates a new depth stencil state with depth testing disabled and depth writes disabled.

Returns
Unique pointer to the created depth stencil state.

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateDepthStencilState_DepthRead() [1/2]

IDepthStencilState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateDepthStencilState_DepthRead ( )

◆ CreateDepthStencilState_DepthRead() [2/2]

Creates a new depth stencil state with depth testing enabled, depth writes disabled, and the comparison function set to less than or equal.

Returns
Unique pointer to the created depth stencil state.

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateDepthStencilState_DepthReadReverseZ() [1/2]

IDepthStencilState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateDepthStencilState_DepthReadReverseZ ( )

◆ CreateDepthStencilState_DepthReadReverseZ() [2/2]

Creates a new depth stencil state with depth testing enabled, depth writes disabled, and the comparison function set to greater than or equal.

Returns
Unique pointer to the created depth stencil state.

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateDepthStencilState_DepthReverseZ() [1/2]

IDepthStencilState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateDepthStencilState_DepthReverseZ ( )

◆ CreateDepthStencilState_DepthReverseZ() [2/2]

Creates a new depth stencil state with depth testing enabled, depth writes enabled, and the comparison function set to greater than or equal.

Returns
Unique pointer to the created depth stencil state.

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateIndexBuffer() [1/4]

IIndexBuffer Engine3DRadSpace.Graphics.IGraphicsDevice.CreateIndexBuffer ( Span< uint > indices)

◆ CreateIndexBuffer() [2/4]

IIndexBuffer Engine3DRadSpace.Graphics.IGraphicsDevice.CreateIndexBuffer ( ulong numIndices,
BufferUsage usage )

◆ CreateIndexBuffer() [3/4]

virtual std::unique_ptr< IIndexBuffer > Engine3DRadSpace.Graphics.IGraphicsDevice.CreateIndexBuffer ( size_t numIndices,
BufferUsage usage )
pure virtual

Creates a new index buffer with data not set.

Parameters
numIndicesNumber of indices
usageBuffer usage
Returns
Unique pointer to the created index buffer

Implemented in Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateIndexBuffer() [4/4]

virtual std::unique_ptr< IIndexBuffer > Engine3DRadSpace.Graphics.IGraphicsDevice.CreateIndexBuffer ( std::span< unsigned > indices)
pure virtual

Creates a new index buffer from the specified indices.

Parameters
indicesSpan of indices
Returns
Unique pointer to the created index buffer

Implemented in Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateRasterizerState() [1/2]

IRasterizerState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateRasterizerState ( RasterizerFillMode filling = RasterizerFillMode.Solid,
RasterizerCullMode culling = RasterizerCullMode.CullBack,
bool switchFrontBack = false,
int depthBias = 0,
float depthBiasClamp = 0,
float slopeScaleDepthBias = 0,
bool depthClip = false,
bool scissor = false,
bool multisample = false,
bool aaLine = false )

◆ CreateRasterizerState() [2/2]

virtual std::unique_ptr< IRasterizerState > Engine3DRadSpace.Graphics.IGraphicsDevice.CreateRasterizerState ( RasterizerFillMode filling = RasterizerFillMode::Solid,
RasterizerCullMode culling = RasterizerCullMode::CullBack,
bool switchFrontBack = false,
int depthBias = 0,
float depthBiasClamp = 0,
float slopeScaleDepthBias = 0,
bool depthClip = false,
bool scissor = false,
bool multisample = false,
bool aaLine = false )
pure virtual

Creates a new rasterizer state with the specified parameters.

Parameters
fillingRasterizer fill mode
cullingRasterizer cull mode
switchFrontBackWhether to switch front and back faces
depthBiasDepth bias
depthBiasClampDepth bias clamp
slopeScaleDepthBiasSlope scale depth bias
depthClipWhether to enable depth clipping
scissorWhether to enable scissor testing
multisampleWhether to enable multisampling
aaLineWhether to enable anti-aliased lines
Returns
Unique pointer to the created rasterizer state

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateRasterizerState_CullClockwise() [1/2]

IRasterizerState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateRasterizerState_CullClockwise ( )

◆ CreateRasterizerState_CullClockwise() [2/2]

Creates a new rasterizer state with clockwise culling.

Returns
Unique pointer to the created rasterizer state

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateRasterizerState_CullCounterClockwise() [1/2]

IRasterizerState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateRasterizerState_CullCounterClockwise ( )

◆ CreateRasterizerState_CullCounterClockwise() [2/2]

Creates a new rasterizer state with counter-clockwise culling.

Returns
Unique pointer to the created rasterizer state

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateRasterizerState_CullNone() [1/2]

IRasterizerState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateRasterizerState_CullNone ( )

◆ CreateRasterizerState_CullNone() [2/2]

Creates a new rasterizer state with culling disabled.

Returns
Unique pointer to the created rasterizer state

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateRasterizerState_Wireframe() [1/2]

IRasterizerState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateRasterizerState_Wireframe ( )

◆ CreateRasterizerState_Wireframe() [2/2]

Creates a new rasterizer state with wireframe fill mode.

Returns
Unique pointer to the created rasterizer state

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateRenderTarget() [1/2]

IRenderTarget Engine3DRadSpace.Graphics.IGraphicsDevice.CreateRenderTarget ( ulong x,
ulong y,
PixelFormat format )

◆ CreateRenderTarget() [2/2]

virtual std::unique_ptr< IRenderTarget > Engine3DRadSpace.Graphics.IGraphicsDevice.CreateRenderTarget ( size_t x,
size_t y,
PixelFormat format )
pure virtual

Creates a new render target with the specified dimensions and pixel format.

Parameters
xWidth of the render target
yHeight of the render target
formatPixel format of the render target
Returns
Unique pointer to the created render target

Implemented in Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateSamplerState() [1/4]

ISamplerState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateSamplerState ( )

◆ CreateSamplerState() [2/4]

ISamplerState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateSamplerState ( TextureFilter filter,
TextureAddressMode addressU,
TextureAddressMode addressV,
TextureAddressMode addressW,
float mipLODBias,
uint maxAnisotropy,
ComparisonFunction comparisonFunc,
Math.Color borderColor,
float minLOD,
float maxLOD )

◆ CreateSamplerState() [3/4]

Creates a new texture sampler state with default parameters.

Returns
Unique pointer to the created sampler state

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateSamplerState() [4/4]

virtual std::unique_ptr< ISamplerState > Engine3DRadSpace.Graphics.IGraphicsDevice.CreateSamplerState ( TextureFilter filter,
TextureAddressMode addressU,
TextureAddressMode addressV,
TextureAddressMode addressW,
float mipLODBias,
unsigned maxAnisotropy,
ComparisonFunction comparisonFunc,
const Math::Color & borderColor,
float minLOD,
float maxLOD )
pure virtual

Creates a new texture sampler state with the specified parameters.

Parameters
filterTexture filtering mode to use for minification, magnification, and mip-level sampling
addressUAddressing mode for the U texture coordinate
addressVAddressing mode for the V texture coordinate
addressWAddressing mode for the W texture coordinate
mipLODBiasOffset applied to the calculated mipmap level
maxAnisotropyClamping value used when the filter is anisotropic
comparisonFuncComparison function used when sampling with a comparison filter
borderColorBorder color used when an address mode is set to Border
minLODLower end of the mipmap range to clamp access to
maxLODUpper end of the mipmap range to clamp access to
Returns
Unique pointer to the created sampler state

◆ CreateSamplerState_AnisotropicClamp() [1/2]

ISamplerState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateSamplerState_AnisotropicClamp ( )

◆ CreateSamplerState_AnisotropicClamp() [2/2]

Creates a new sampler state using anisotropic filtering with clamp addressing on all axes.

Returns
Unique pointer to the created sampler state

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateSamplerState_AnisotropicWrap() [1/2]

ISamplerState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateSamplerState_AnisotropicWrap ( )

◆ CreateSamplerState_AnisotropicWrap() [2/2]

Creates a new sampler state using anisotropic filtering with wrap addressing on all axes.

Returns
Unique pointer to the created sampler state

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateSamplerState_LinearClamp() [1/2]

ISamplerState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateSamplerState_LinearClamp ( )

◆ CreateSamplerState_LinearClamp() [2/2]

Creates a new sampler state using linear filtering with clamp addressing on all axes.

Returns
Unique pointer to the created sampler state

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateSamplerState_LinearWrap() [1/2]

ISamplerState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateSamplerState_LinearWrap ( )

◆ CreateSamplerState_LinearWrap() [2/2]

Creates a new sampler state using linear filtering with wrap addressing on all axes.

Returns
Unique pointer to the created sampler state

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateSamplerState_PointClamp() [1/2]

ISamplerState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateSamplerState_PointClamp ( )

◆ CreateSamplerState_PointClamp() [2/2]

Creates a new sampler state using point filtering with clamp addressing on all axes.

Returns
Unique pointer to the created sampler state

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateSamplerState_PointWrap() [1/2]

ISamplerState Engine3DRadSpace.Graphics.IGraphicsDevice.CreateSamplerState_PointWrap ( )

◆ CreateSamplerState_PointWrap() [2/2]

Creates a new sampler state using point filtering with wrap addressing on all axes.

Returns
Unique pointer to the created sampler state

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateTexture1D() [1/4]

ITexture1D Engine3DRadSpace.Graphics.IGraphicsDevice.CreateTexture1D ( Span< Math.Color > colors)

◆ CreateTexture1D() [2/4]

ITexture1D Engine3DRadSpace.Graphics.IGraphicsDevice.CreateTexture1D ( ulong size,
BufferUsage usage )

◆ CreateTexture1D() [3/4]

virtual std::unique_ptr< ITexture1D > Engine3DRadSpace.Graphics.IGraphicsDevice.CreateTexture1D ( size_t numElements,
PixelFormat format )
pure virtual

Creates a new 1D texture with the specified number of elements and pixel format.

Parameters
numElementsNumber of elements (texels) in the texture
formatPixel format of the texture
Returns
Unique pointer to the created 1D texture

Implemented in Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateTexture1D() [4/4]

virtual std::unique_ptr< ITexture1D > Engine3DRadSpace.Graphics.IGraphicsDevice.CreateTexture1D ( std::span< Math::Color > colors)
pure virtual

Creates a new 1D texture initialized with the specified colors.

Parameters
colorsSpan of colors used to initialize the texture
Returns
Unique pointer to the created 1D texture

Implemented in Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateTexture2D() [1/4]

ITexture2D Engine3DRadSpace.Graphics.IGraphicsDevice.CreateTexture2D ( IntPtr data,
ulong x,
ulong y,
PixelFormat format,
BufferUsage usage )

◆ CreateTexture2D() [2/4]

ITexture2D Engine3DRadSpace.Graphics.IGraphicsDevice.CreateTexture2D ( string path)

◆ CreateTexture2D() [3/4]

virtual std::unique_ptr< ITexture2D > Engine3DRadSpace.Graphics.IGraphicsDevice.CreateTexture2D ( const std::filesystem::path & path)
pure virtual

Creates a new 2D texture by loading it from an image file.

Parameters
pathPath to the image file
Returns
Unique pointer to the created 2D texture

Implemented in Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateTexture2D() [4/4]

virtual std::unique_ptr< ITexture2D > Engine3DRadSpace.Graphics.IGraphicsDevice.CreateTexture2D ( void * data,
size_t x,
size_t y,
PixelFormat format,
BufferUsage usage )
pure virtual

Creates a new 2D texture with the specified dimensions, pixel format, and initial data.

Parameters
dataPointer to the initial texture data, or nullptr to leave the texture uninitialized
xWidth of the texture
yHeight of the texture
formatPixel format of the texture
usageBuffer usage of the texture
Returns
Unique pointer to the created 2D texture

Implemented in Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateTexture3D() [1/2]

ITexture3D Engine3DRadSpace.Graphics.IGraphicsDevice.CreateTexture3D ( ITexture3D[] textures)

◆ CreateTexture3D() [2/2]

virtual std::unique_ptr< ITexture3D > Engine3DRadSpace.Graphics.IGraphicsDevice.CreateTexture3D ( std::span< ITexture2D * > textures)
pure virtual

Creates a new 3D texture from a span of 2D textures, each representing a depth slice.

Parameters
texturesSpan of 2D textures used as depth slices
Returns
Unique pointer to the created 3D texture

Implemented in Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateTextureCube() [1/4]

ITextureCube Engine3DRadSpace.Graphics.IGraphicsDevice.CreateTextureCube ( ITexture2D[] cubeMap)

◆ CreateTextureCube() [2/4]

ITextureCube Engine3DRadSpace.Graphics.IGraphicsDevice.CreateTextureCube ( string path)

◆ CreateTextureCube() [3/4]

virtual std::unique_ptr< ITextureCube > Engine3DRadSpace.Graphics.IGraphicsDevice.CreateTextureCube ( const std::filesystem::path & path)
pure virtual

Creates a new cube texture by loading it from a file.

Parameters
pathPath to the cube map file
Returns
Unique pointer to the created cube texture

Implemented in Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateTextureCube() [4/4]

virtual std::unique_ptr< ITextureCube > Engine3DRadSpace.Graphics.IGraphicsDevice.CreateTextureCube ( std::array< ITexture2D *, 6 > cubeMap)
pure virtual

Creates a new cube texture from six individual 2D textures, one for each face.

Parameters
cubeMapArray of six 2D textures, in the order +X, -X, +Y, -Y, +Z, -Z
Returns
Unique pointer to the created cube texture

Implemented in Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateVertexBuffer() [1/5]

IVertexBuffer Engine3DRadSpace.Graphics.IGraphicsDevice.CreateVertexBuffer ( IntPtr data,
ulong structSize,
ulong numVertices,
BufferUsage usage )

◆ CreateVertexBuffer() [2/5]

virtual std::unique_ptr< IVertexBuffer > Engine3DRadSpace.Graphics.IGraphicsDevice.CreateVertexBuffer ( const void * data,
size_t structSize,
size_t numVertices,
BufferUsage usage )
pure virtual

Creates a new vertex buffer from raw vertex data.

Parameters
dataPointer to the initial vertex data, or nullptr to leave the buffer uninitialized
structSizeSize, in bytes, of a single vertex structure
numVerticesNumber of vertices in the buffer
usageBuffer usage of the vertex buffer
Returns
Unique pointer to the created vertex buffer

Implemented in Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ CreateVertexBuffer() [3/5]

template<VertexDecl V>
std::unique_ptr< IVertexBuffer > Engine3DRadSpace.Graphics.IGraphicsDevice.CreateVertexBuffer ( size_t numVertices,
BufferUsage usage )
inline

Creates a new, uninitialized vertex buffer sized for the specified strongly-typed vertex count.

Template Parameters
VVertex declaration type
Parameters
numVerticesNumber of vertices the buffer should hold
usageBuffer usage of the vertex buffer
Returns
Unique pointer to the created vertex buffer

◆ CreateVertexBuffer() [4/5]

template<VertexDecl V>
std::unique_ptr< IVertexBuffer > Engine3DRadSpace.Graphics.IGraphicsDevice.CreateVertexBuffer ( std::span< const V > vertices,
BufferUsage usage )
inline

Creates a new vertex buffer from a span of strongly-typed, const vertices.

Template Parameters
VVertex declaration type
Parameters
verticesSpan of vertices used to initialize the buffer
usageBuffer usage of the vertex buffer
Returns
Unique pointer to the created vertex buffer

◆ CreateVertexBuffer() [5/5]

template<VertexDecl V>
std::unique_ptr< IVertexBuffer > Engine3DRadSpace.Graphics.IGraphicsDevice.CreateVertexBuffer ( std::span< V > vertices,
BufferUsage usage )
inline

Creates a new vertex buffer from a span of strongly-typed vertices.

Template Parameters
VVertex declaration type
Parameters
verticesSpan of vertices used to initialize the buffer
usageBuffer usage of the vertex buffer
Returns
Unique pointer to the created vertex buffer

◆ GetBackBuffer() [1/2]

IRenderTarget Engine3DRadSpace.Graphics.IGraphicsDevice.GetBackBuffer ( )

◆ GetBackBuffer() [2/2]

◆ GetBackBufferTexture() [1/2]

ITexture2D Engine3DRadSpace.Graphics.IGraphicsDevice.GetBackBufferTexture ( )

◆ GetBackBufferTexture() [2/2]

Gets the backbuffer texture.

Returns
Pointer to the backbuffer texture.

Implemented in Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ GetDepthBuffer() [1/2]

IDepthStencilBuffer Engine3DRadSpace.Graphics.IGraphicsDevice.GetDepthBuffer ( )

◆ GetDepthBuffer() [2/2]

Gets the default depth stencil buffer.

Returns
Reference to the default depth stencil buffer.

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ GetDepthStencilState() [1/2]

IDepthStencilState Engine3DRadSpace.Graphics.IGraphicsDevice.GetDepthStencilState ( )

◆ GetDepthStencilState() [2/2]

Gets the depth stencil buffer that's currently set.

Returns
An copy of the depth stencil state.

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ GetRasterizerState() [1/2]

IRasterizerState Engine3DRadSpace.Graphics.IGraphicsDevice.GetRasterizerState ( )

◆ GetRasterizerState() [2/2]

◆ GetResolution()

Point Engine3DRadSpace.Graphics.IGraphicsDevice.GetResolution ( )

◆ GetScreenQuad() [1/2]

IVertexBuffer Engine3DRadSpace.Graphics.IGraphicsDevice.GetScreenQuad ( )

◆ GetScreenQuad() [2/2]

Gets an vertex buffer that covers the entire backbuffer.

Returns
Vertex buffer reference

Implemented in Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ ImmediateContext() [1/2]

IGraphicsCommandList Engine3DRadSpace.Graphics.IGraphicsDevice.ImmediateContext ( )

◆ ImmediateContext() [2/2]

Gets the immediate graphics command list associated with this device.

Returns
Pointer to the immediate graphics command list

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ NativeHandle() [1/2]

IntPtr Engine3DRadSpace.Graphics.IGraphicsDevice.NativeHandle ( )

◆ NativeHandle() [2/2]

virtual void * Engine3DRadSpace.Graphics.IGraphicsDevice.NativeHandle ( ) const
pure virtualnoexcept

Gets the underlying native handle of this graphics device (e.g. an ID3D11Device pointer).

Returns
Pointer to the native device handle

Implemented in Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ operator=() [1/2]

IGraphicsDevice & Engine3DRadSpace.Graphics.IGraphicsDevice.operator= ( const IGraphicsDevice & )
protecteddelete

◆ operator=() [2/2]

IGraphicsDevice & Engine3DRadSpace.Graphics.IGraphicsDevice.operator= ( IGraphicsDevice && )
protecteddefaultnoexcept

◆ Resolution()

virtual Math::Point Engine3DRadSpace.Graphics.IGraphicsDevice.Resolution ( ) const
pure virtualnoexcept

Gets the backbuffer size.

Returns
Resolution of the backbuffer in pixels.

Implemented in Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ ShaderCompiler() [1/2]

IShaderCompiler Engine3DRadSpace.Graphics.IGraphicsDevice.ShaderCompiler ( )

◆ ShaderCompiler() [2/2]

Gets the associated shader compiler class.

Returns
Pointer to the shader compiler.

summmary> Returns a 2x2 blank white texture. /summary>

Implemented in Engine3DRadSpace.Graphics.InstIGraphicsDevice, Engine3DRadSpace.Graphics::DirectX11::GraphicsDevice, and Engine3DRadSpace.Graphics::Null::GraphicsDevice.

◆ WhiteBlank() [1/2]

ITexture2D Engine3DRadSpace.Graphics.IGraphicsDevice.WhiteBlank ( )

Returns a white blank texture.

Returns

◆ WhiteBlank() [2/2]

Member Data Documentation

◆ EnableVSync

bool Engine3DRadSpace.Graphics.IGraphicsDevice.EnableVSync = true

The documentation for this class was generated from the following files: