Loading...
Searching...
No Matches
score::gfx::TextureShareBackendBase Class Reference
Inheritance diagram for score::gfx::TextureShareBackendBase:
score::gfx::TextureShareBackend

Classes

struct  ProducerSlot
 

Public Member Functions

QSize size () const noexcept override
 
bool isValid () const noexcept override
 
bool isProducerReady () const noexcept override
 
QRhiTextureRenderTarget * beginProducerFrame () override
 
QRhiTexture * currentProducerTexture () override
 
QRhiRenderPassDescriptor * producerRenderPassDescriptor () const noexcept override
 
bool hasNewFrame () const noexcept override
 
- Public Member Functions inherited from score::gfx::TextureShareBackend
virtual bool setup (QRhi *producer, QRhi *consumer, QSize size, QRhiTexture::Format format)=0
 
virtual bool setupProducer (QRhi *producer, QSize size, QRhiTexture::Format format)=0
 
virtual bool setupConsumer (QRhi *consumer)=0
 
virtual void resize (QSize newSize)=0
 
virtual void cleanup ()=0
 
virtual void endProducerFrame (QRhiCommandBuffer *cb)=0
 
virtual QRhiTexture * acquireConsumerTexture (QRhiCommandBuffer *cb)=0
 

Protected Member Functions

bool createProducerResources ()
 
void destroyProducerResources ()
 
void destroyConsumerResources ()
 

Protected Attributes

ProducerSlot m_producerSlots [3]
 
QRhiRenderPassDescriptor * m_producerRenderPass {}
 
QRhiTexture * m_sharedTextures [3] {}
 
QRhiTexture * m_consumerTexture {}
 
QRhi * m_producer {}
 
QRhi * m_consumer {}
 
QSize m_size
 
QRhiTexture::Format m_format {QRhiTexture::RGBA8}
 
std::atomic< bool > m_producerReady {false}
 
std::atomic< bool > m_consumerReady {false}
 
TripleBufferIndex m_tripleBuffer
 
int m_currentWriteSlot {-1}
 

Member Function Documentation

◆ beginProducerFrame()

QRhiTextureRenderTarget * score::gfx::TextureShareBackendBase::beginProducerFrame ( )
inlineoverridevirtual

◆ currentProducerTexture()

QRhiTexture * score::gfx::TextureShareBackendBase::currentProducerTexture ( )
inlineoverridevirtual

◆ hasNewFrame()

bool score::gfx::TextureShareBackendBase::hasNewFrame ( ) const
inlineoverridevirtualnoexcept

◆ isProducerReady()

bool score::gfx::TextureShareBackendBase::isProducerReady ( ) const
inlineoverridevirtualnoexcept

◆ isValid()

bool score::gfx::TextureShareBackendBase::isValid ( ) const
inlineoverridevirtualnoexcept

◆ producerRenderPassDescriptor()

QRhiRenderPassDescriptor * score::gfx::TextureShareBackendBase::producerRenderPassDescriptor ( ) const
inlineoverridevirtualnoexcept

◆ size()

QSize score::gfx::TextureShareBackendBase::size ( ) const
inlineoverridevirtualnoexcept

The documentation for this class was generated from the following file:
  • TextureShare.cpp