Diligent Engine API Reference
Public Member Functions | List of all members
Diligent::IRenderDevice Class Referenceabstract

Render device interface. More...

Inheritance diagram for Diligent::IRenderDevice:
Diligent::IObject Diligent::IRenderDeviceD3D11 Diligent::IRenderDeviceD3D12 Diligent::IRenderDeviceGL Diligent::IRenderDeviceGLES

Public Member Functions

virtual void QueryInterface (const Diligent::INTERFACE_ID &IID, IObject **ppInterface)=0
 Queries the specific interface, see IObject::QueryInterface() for details.
 
virtual void CreateBuffer (const BufferDesc &BuffDesc, const BufferData &BuffData, IBuffer **ppBuffer)=0
 Creates a new buffer object. More...
 
virtual void CreateShader (const ShaderCreationAttribs &CreationAttribs, IShader **ppShader)=0
 Creates a new shader object. More...
 
virtual void CreateTexture (const TextureDesc &TexDesc, const TextureData &Data, ITexture **ppTexture)=0
 Creates a new texture object. More...
 
virtual void CreateSampler (const SamplerDesc &SamDesc, ISampler **ppSampler)=0
 Creates a new sampler object. More...
 
virtual void CreateResourceMapping (const ResourceMappingDesc &MappingDesc, IResourceMapping **ppMapping)=0
 Creates a new resource mapping. More...
 
virtual void CreatePipelineState (const PipelineStateDesc &PipelineDesc, IPipelineState **ppPipelineState)=0
 Creates a new pipeline state object. More...
 
virtual const DeviceCapsGetDeviceCaps () const =0
 Gets the device capabilities, see Diligent::DeviceCaps for details.
 
virtual const TextureFormatInfoGetTextureFormatInfo (TEXTURE_FORMAT TexFormat)=0
 Returns the basic texture format information. More...
 
virtual const TextureFormatInfoExtGetTextureFormatInfoExt (TEXTURE_FORMAT TexFormat)=0
 Returns the extended texture format information. More...
 
- Public Member Functions inherited from Diligent::IObject
virtual Atomics::Long AddRef ()=0
 Increments the number of strong references by 1. More...
 
virtual Atomics::Long Release ()=0
 Decrements the number of strong references by 1 and destroys the object when the counter reaches zero. More...
 
virtual IReferenceCountersGetReferenceCounters () const =0
 Returns the pointer to IReferenceCounters interface of the associated reference counters object. The metod does NOT increment the number of strong references to the returned object.
 

Detailed Description

Render device interface.

Member Function Documentation

virtual void Diligent::IRenderDevice::CreateBuffer ( const BufferDesc BuffDesc,
const BufferData BuffData,
IBuffer **  ppBuffer 
)
pure virtual

Creates a new buffer object.

Parameters
[in]BuffDesc- Buffer description, see Diligent::BufferDesc for details.
[in]BuffData- Reference to a Diligent::BufferData structure that describes the initialization data. To allocate space only, provide default value BufferData(). Static buffers (USAGE_STATIC) must be initialized at creation time.
[out]ppBuffer- Address of the memory location where the pointer to the buffer interface will be stored. The function calls AddRef(), so that the new buffer will contain one refernce and must be released by a call to Release().
Remarks
Size of a uniform buffer (BIND_UNIFORM_BUFFER) must be multiple of 16.
Stride of a formatted buffer will be computed automatically from the format if ElementByteStride member of buffer description is set to default value (0).
virtual void Diligent::IRenderDevice::CreatePipelineState ( const PipelineStateDesc PipelineDesc,
IPipelineState **  ppPipelineState 
)
pure virtual

Creates a new pipeline state object.

Parameters
[in]PipelineDesc- Pipeline state description, see Diligent::PipelineStateDesc for details.
[out]ppPipelineState- Address of the memory location where the pointer to the pipeline state interface will be stored. The function calls AddRef(), so that the new object will contain one refernce.
virtual void Diligent::IRenderDevice::CreateResourceMapping ( const ResourceMappingDesc MappingDesc,
IResourceMapping **  ppMapping 
)
pure virtual

Creates a new resource mapping.

Parameters
[in]MappingDesc- Resource mapping description, see Diligent::ResourceMappingDesc for details.
[out]ppMapping- Address of the memory location where the pointer to the resource mapping interface will be stored. The function calls AddRef(), so that the new object will contain one refernce.
virtual void Diligent::IRenderDevice::CreateSampler ( const SamplerDesc SamDesc,
ISampler **  ppSampler 
)
pure virtual

Creates a new sampler object.

Parameters
[in]SamDesc- Sampler description, see Diligent::SamplerDesc for details.
[out]ppSampler- Address of the memory location where the pointer to the sampler interface will be stored. The function calls AddRef(), so that the new object will contain one refernce.
Remarks
If an application attempts to create a sampler interface with the same attributes as an existing interface, the same interface will be returned.
Note
In D3D11, 4096 unique sampler state objects can be created on a device at a time.
virtual void Diligent::IRenderDevice::CreateShader ( const ShaderCreationAttribs CreationAttribs,
IShader **  ppShader 
)
pure virtual

Creates a new shader object.

Parameters
[in]CreationAttribs- Shader creation attributes, see Diligent::ShaderCreationAttribs for details.
[out]ppShader- Address of the memory location where the pointer to the shader interface will be stored. The function calls AddRef(), so that the new object will contain one refernce.
virtual void Diligent::IRenderDevice::CreateTexture ( const TextureDesc TexDesc,
const TextureData Data,
ITexture **  ppTexture 
)
pure virtual

Creates a new texture object.

Parameters
[in]TexDesc- Texture description, see Diligent::TextureDesc for details.
[in]Data- Reference to a Diligent::TextureData structure that describes the initialization data. To allocate space only, provide default value TextureData(). Static textures (USAGE_STATIC) must be initialized at creation time.
[out]ppTexture- Address of the memory location where the pointer to the texture interface will be stored. The function calls AddRef(), so that the new object will contain one refernce.
Remarks
To create all mip levels, set the TexDesc.MipLevels to zero.
Multisampled resources cannot be initialzed with data when they are created.
If initial data is provided, number of subresources must exactly match the number of subresources in the texture (which is the number of mip levels times the number of array slices. For a 3D texture, this is just the number of mip levels). For example, for a 15 x 6 x 2 2D texture array, the following array of subresources should be provided:
15x6, 7x3, 3x1, 1x1, 15x6, 7x3, 3x1, 1x1.
For a 15 x 6 x 4 3D texture, the following array of subresources should be provided:
15x6x4, 7x3x2, 3x1x1, 1x1x1
virtual const TextureFormatInfo& Diligent::IRenderDevice::GetTextureFormatInfo ( TEXTURE_FORMAT  TexFormat)
pure virtual

Returns the basic texture format information.

See Diligent::TextureFormatInfo for details on the provided information.

Parameters
[in]TexFormat- Texture format for which to provide the information
Returns
Const reference to the TextureFormatInfo structure containing the texture format description.
virtual const TextureFormatInfoExt& Diligent::IRenderDevice::GetTextureFormatInfoExt ( TEXTURE_FORMAT  TexFormat)
pure virtual

Returns the extended texture format information.

See Diligent::TextureFormatInfoExt for details on the provided information.

Parameters
[in]TexFormat- Texture format for which to provide the information
Returns
Const reference to the TextureFormatInfoExt structure containing the extended texture format description.
Remarks
The first time this method is called for a particular format, it may be considerably slower than GetTextureFormatInfo(). If you do not require extended information, call GetTextureFormatInfo() instead.