LLGL 0.05 Beta
Loading...
Searching...
No Matches
Global utility functions to parse resource descriptors from strings.

Classes

class  LLGL::ParseContext
 Context class for descriptor parsing. More...

Functions

LLGL_EXPORT ParseContext LLGL::Parse (const char *format,...)
 Returns a parse context for the input source code.
LLGL_EXPORT ParseContext LLGL::Parse (const StringView &s)
 Returns a parse context for the input source code.
LLGL_EXPORT TextureDescriptor LLGL::Texture1DDesc (Format format, std::uint32_t width, long bindFlags=(BindFlags::ColorAttachment|BindFlags::Sampled))
 Returns a TextureDescriptor structure with the TextureType::Texture1D type.
LLGL_EXPORT TextureDescriptor LLGL::Texture2DDesc (Format format, std::uint32_t width, std::uint32_t height, long bindFlags=(BindFlags::ColorAttachment|BindFlags::Sampled))
 Returns a TextureDescriptor structure with the TextureType::Texture2D type.
LLGL_EXPORT TextureDescriptor LLGL::Texture3DDesc (Format format, std::uint32_t width, std::uint32_t height, std::uint32_t depth, long bindFlags=(BindFlags::ColorAttachment|BindFlags::Sampled))
 Returns a TextureDescriptor structure with the TextureType::Texture3D type.
LLGL_EXPORT TextureDescriptor LLGL::TextureCubeDesc (Format format, std::uint32_t width, std::uint32_t height, long bindFlags=(BindFlags::ColorAttachment|BindFlags::Sampled))
 Returns a TextureDescriptor structure with the TextureType::TextureCube type.
LLGL_EXPORT TextureDescriptor LLGL::Texture1DArrayDesc (Format format, std::uint32_t width, std::uint32_t arrayLayers, long bindFlags=(BindFlags::ColorAttachment|BindFlags::Sampled))
 Returns a TextureDescriptor structure with the TextureType::Texture1DArray type.
LLGL_EXPORT TextureDescriptor LLGL::Texture2DArrayDesc (Format format, std::uint32_t width, std::uint32_t height, std::uint32_t arrayLayers, long bindFlags=(BindFlags::ColorAttachment|BindFlags::Sampled))
 Returns a TextureDescriptor structure with the TextureType::Texture2DArray type.
LLGL_EXPORT TextureDescriptor LLGL::TextureCubeArrayDesc (Format format, std::uint32_t width, std::uint32_t height, std::uint32_t arrayLayers, long bindFlags=(BindFlags::ColorAttachment|BindFlags::Sampled))
 Returns a TextureDescriptor structure with the TextureType::TextureCubeArray type.
LLGL_EXPORT TextureDescriptor LLGL::Texture2DMSDesc (Format format, std::uint32_t width, std::uint32_t height, std::uint32_t samples, long bindFlags=(BindFlags::ColorAttachment|BindFlags::Sampled))
 Returns a TextureDescriptor structure with the TextureType::Texture2DMS type.
LLGL_EXPORT TextureDescriptor LLGL::Texture2DMSArrayDesc (Format format, std::uint32_t width, std::uint32_t height, std::uint32_t arrayLayers, std::uint32_t samples, long bindFlags=(BindFlags::ColorAttachment|BindFlags::Sampled))
 Returns a TextureDescriptor structure with the TextureType::Texture2DMSArray type.
LLGL_EXPORT BufferDescriptor LLGL::VertexBufferDesc (std::uint64_t size, std::uint32_t stride=0, long cpuAccessFlags=0)
 Returns a BufferDescriptor structure for a vertex buffer.
BufferDescriptor LLGL::VertexBufferDesc (std::uint64_t size, const VertexFormat &vertexFormat, long cpuAccessFlags=0)
LLGL_EXPORT BufferDescriptor LLGL::IndexBufferDesc (std::uint64_t size, const Format format, long cpuAccessFlags=0)
 Returns a BufferDescriptor structure for an index buffer.
LLGL_EXPORT BufferDescriptor LLGL::ConstantBufferDesc (std::uint64_t size, long cpuAccessFlags=0)
 Returns a BufferDescriptor structure for a constant buffer.
LLGL_EXPORT BufferDescriptor LLGL::StorageBufferDesc (std::uint64_t size, const StorageBufferType storageType, std::uint32_t stride, long cpuAccessFlags=CPUAccessFlags::ReadWrite)
 Returns a BufferDescriptor structure for a storage buffer.
LLGL_EXPORT ShaderDescriptor LLGL::ShaderDescFromFile (const ShaderType type, const char *filename, const char *entryPoint=nullptr, const char *profile=nullptr, long flags=0)
 Returns a ShaderDescriptor structure.
LLGL_EXPORT PipelineLayoutDescriptor LLGL::PipelineLayoutDesc (const ShaderReflection &reflection)
 Converts the specified shader reflection descriptor into a pipeline layout descriptor.
LLGL_EXPORT RenderPassDescriptor LLGL::RenderPassDesc (const RenderTargetDescriptor &renderTargetDesc)
 Converts the specified render target descriptor into a render pass descriptor with default settings.

Detailed Description

Function Documentation

◆ ConstantBufferDesc()

LLGL_EXPORT BufferDescriptor LLGL::ConstantBufferDesc ( std::uint64_t size,
long cpuAccessFlags = 0 )

Returns a BufferDescriptor structure for a constant buffer.

See also
RenderSystem::CreateBuffer

◆ IndexBufferDesc()

LLGL_EXPORT BufferDescriptor LLGL::IndexBufferDesc ( std::uint64_t size,
const Format format,
long cpuAccessFlags = 0 )

Returns a BufferDescriptor structure for an index buffer.

See also
RenderSystem::CreateBuffer

◆ Parse() [1/2]

LLGL_EXPORT ParseContext LLGL::Parse ( const char * format,
... )

Returns a parse context for the input source code.

Parameters
[in]formatSpecifies the input string. This is treated just like a ::printf input string and each token preceded with a '' character will be substituted with the next variadic argument. If no '' character is found in the input string, this parameter is simply forwarded to the ParseContext class.
Remarks
This is only a convenience function for the ParseContext constructor.
See also
ParseContext

◆ Parse() [2/2]

LLGL_EXPORT ParseContext LLGL::Parse ( const StringView & s)
inline

Returns a parse context for the input source code.

Parameters
[in]sSpecifies the input string as string view. This parameter is simply forwarded to the ParseContext class.
Remarks
This is only a convenience function for the ParseContext constructor.
See also
ParseContext

◆ PipelineLayoutDesc()

LLGL_EXPORT PipelineLayoutDescriptor LLGL::PipelineLayoutDesc ( const ShaderReflection & reflection)

Converts the specified shader reflection descriptor into a pipeline layout descriptor.

Remarks
This can be used to specify a pipeline layout that fits the shader layout declaration. Some rendering APIs, such as OpenGL 2.0, do not provide sufficient functionality for shader reflection. Hence, this utility function cannot be used in conjunction with all renderer versions.

◆ RenderPassDesc()

LLGL_EXPORT RenderPassDescriptor LLGL::RenderPassDesc ( const RenderTargetDescriptor & renderTargetDesc)

Converts the specified render target descriptor into a render pass descriptor with default settings.

Remarks
This can be used to specify a render pass that is compatible with a render target.

◆ ShaderDescFromFile()

LLGL_EXPORT ShaderDescriptor LLGL::ShaderDescFromFile ( const ShaderType type,
const char * filename,
const char * entryPoint = nullptr,
const char * profile = nullptr,
long flags = 0 )

Returns a ShaderDescriptor structure.

Remarks
The source type is determined by the filename extension using the following rules:
See also
RenderSystem::CreateShader

◆ StorageBufferDesc()

LLGL_EXPORT BufferDescriptor LLGL::StorageBufferDesc ( std::uint64_t size,
const StorageBufferType storageType,
std::uint32_t stride,
long cpuAccessFlags = CPUAccessFlags::ReadWrite )

Returns a BufferDescriptor structure for a storage buffer.

See also
RenderSystem::CreateBuffer

◆ Texture1DArrayDesc()

LLGL_EXPORT TextureDescriptor LLGL::Texture1DArrayDesc ( Format format,
std::uint32_t width,
std::uint32_t arrayLayers,
long bindFlags = (BindFlags::ColorAttachment|BindFlags::Sampled) )

◆ Texture1DDesc()

LLGL_EXPORT TextureDescriptor LLGL::Texture1DDesc ( Format format,
std::uint32_t width,
long bindFlags = (BindFlags::ColorAttachment|BindFlags::Sampled) )

Returns a TextureDescriptor structure with the TextureType::Texture1D type.

See also
RenderSystem::CreateTexture

◆ Texture2DArrayDesc()

LLGL_EXPORT TextureDescriptor LLGL::Texture2DArrayDesc ( Format format,
std::uint32_t width,
std::uint32_t height,
std::uint32_t arrayLayers,
long bindFlags = (BindFlags::ColorAttachment|BindFlags::Sampled) )

◆ Texture2DDesc()

LLGL_EXPORT TextureDescriptor LLGL::Texture2DDesc ( Format format,
std::uint32_t width,
std::uint32_t height,
long bindFlags = (BindFlags::ColorAttachment|BindFlags::Sampled) )

Returns a TextureDescriptor structure with the TextureType::Texture2D type.

See also
RenderSystem::CreateTexture

◆ Texture2DMSArrayDesc()

LLGL_EXPORT TextureDescriptor LLGL::Texture2DMSArrayDesc ( Format format,
std::uint32_t width,
std::uint32_t height,
std::uint32_t arrayLayers,
std::uint32_t samples,
long bindFlags = (BindFlags::ColorAttachment|BindFlags::Sampled) )

◆ Texture2DMSDesc()

LLGL_EXPORT TextureDescriptor LLGL::Texture2DMSDesc ( Format format,
std::uint32_t width,
std::uint32_t height,
std::uint32_t samples,
long bindFlags = (BindFlags::ColorAttachment|BindFlags::Sampled) )

Returns a TextureDescriptor structure with the TextureType::Texture2DMS type.

See also
RenderSystem::CreateTexture

◆ Texture3DDesc()

LLGL_EXPORT TextureDescriptor LLGL::Texture3DDesc ( Format format,
std::uint32_t width,
std::uint32_t height,
std::uint32_t depth,
long bindFlags = (BindFlags::ColorAttachment|BindFlags::Sampled) )

Returns a TextureDescriptor structure with the TextureType::Texture3D type.

See also
RenderSystem::CreateTexture

◆ TextureCubeArrayDesc()

LLGL_EXPORT TextureDescriptor LLGL::TextureCubeArrayDesc ( Format format,
std::uint32_t width,
std::uint32_t height,
std::uint32_t arrayLayers,
long bindFlags = (BindFlags::ColorAttachment|BindFlags::Sampled) )

◆ TextureCubeDesc()

LLGL_EXPORT TextureDescriptor LLGL::TextureCubeDesc ( Format format,
std::uint32_t width,
std::uint32_t height,
long bindFlags = (BindFlags::ColorAttachment|BindFlags::Sampled) )

Returns a TextureDescriptor structure with the TextureType::TextureCube type.

See also
RenderSystem::CreateTexture

◆ VertexBufferDesc() [1/2]

BufferDescriptor LLGL::VertexBufferDesc ( std::uint64_t size,
const VertexFormat & vertexFormat,
long cpuAccessFlags = 0 )
inline
Deprecated
Since 0.05b; Use new version without vertexFormat parameter.

◆ VertexBufferDesc() [2/2]

LLGL_EXPORT BufferDescriptor LLGL::VertexBufferDesc ( std::uint64_t size,
std::uint32_t stride = 0,
long cpuAccessFlags = 0 )

Returns a BufferDescriptor structure for a vertex buffer.

See also
RenderSystem::CreateBuffer