LiteFX 0.5.1.2025
Computer Graphics Engine
Loading...
Searching...
No Matches
LiteFX::Graphics::Blitter< TBackend > Class Template Reference

Utility class that can be used to issue blit commands and generate mip maps. More...

#include <blitter.hpp>

Inherits LiteFX::SharedObject.

Public Member Functions

 ~Blitter () noexcept override=default
void generateMipMaps (TBackend::image_type &image, TBackend::command_buffer_type &commandBuffer)
Public Member Functions inherited from LiteFX::SharedObject
virtual ~SharedObject () noexcept=default
 Destroys the shared object.
template<typename TSelf>
auto shared_from_this (this TSelf &&self) noexcept
 Returns a shared pointer to the current object instance.
template<typename TSelf>
auto weak_from_this (this TSelf &&self) noexcept -> WeakPtr< std::remove_reference_t< TSelf > >
 Returns a weak pointer to the current object instance.

Static Public Member Functions

static auto create (const TBackend::device_type &device)
 Creates a new blitter instance.

Friends

struct SharedObject::Allocator< Blitter >

Additional Inherited Members

Protected Member Functions inherited from LiteFX::SharedObject
 SharedObject () noexcept=default
 Initializes a new shared object.
 SharedObject (SharedObject &&) noexcept=default
 SharedObject (const SharedObject &)=default
SharedObjectoperator= (SharedObject &&) noexcept=default
SharedObjectoperator= (const SharedObject &)=default
Static Protected Member Functions inherited from LiteFX::SharedObject
template<typename T, typename... TArgs>
static auto create (TArgs &&... args) -> SharedPtr< T >
 Generic factory method used to create instances of the shared object.

Detailed Description

template<render_backend TBackend>
class LiteFX::Graphics::Blitter< TBackend >

Utility class that can be used to issue blit commands and generate mip maps.

This utility class can be used to generate mip maps for images. Note however, that it is more efficient to pre-compute mip maps if possible. Also note that if you need a direct copy of a image, use a ICommandBuffer::transfer command instead.

Template Parameters
TBackendThe type of render backend that implements the blitter.

Constructor & Destructor Documentation

◆ ~Blitter()

template<render_backend TBackend>
LiteFX::Graphics::Blitter< TBackend >::~Blitter ( )
overridedefaultnoexcept

Member Function Documentation

◆ create()

template<render_backend TBackend>
auto LiteFX::Graphics::Blitter< TBackend >::create ( const TBackend::device_type & device)
inlinestatic

Creates a new blitter instance.

Parameters
deviceThe device to allocate resources from.
Returns
A shared pointer to the newly created blitter instance.

◆ generateMipMaps()

template<render_backend TBackend>
void LiteFX::Graphics::Blitter< TBackend >::generateMipMaps ( TBackend::image_type & image,
TBackend::command_buffer_type & commandBuffer )

◆ SharedObject::Allocator< Blitter >

template<render_backend TBackend>
friend struct SharedObject::Allocator< Blitter >
friend