Texture buffer represents a framebuffer with a multiple attached textures. More...
#include <pipeline.h>
Inheritance diagram for TextureBuffer:
Collaboration diagram for TextureBuffer:Classes | |
| struct | TextureDefinition |
Public Member Functions | |
| virtual | ~TextureBuffer () override |
| void | setTexture (u8 index, core::dimension2du size, const std::string &name, video::ECOLOR_FORMAT format, bool clear=false, u8 msaa=0) |
| Configure fixed-size texture for the specific index. | |
| void | setTexture (u8 index, v2f scale_factor, const std::string &name, video::ECOLOR_FORMAT format, bool clear=false, u8 msaa=0) |
| Configure relative-size texture for the specific index. | |
| virtual u8 | getTextureCount () override |
| Return the number of textures in the source. | |
| virtual video::ITexture * | getTexture (u8 index) override |
| Get a texture by index. | |
| virtual void | reset (PipelineContext &context) override |
| void | swapTextures (u8 texture_a, u8 texture_b) |
Public Member Functions inherited from RenderPipelineObject | |
| virtual | ~RenderPipelineObject ()=default |
Private Member Functions | |
| bool | ensureTexture (video::ITexture **textureSlot, const TextureDefinition &definition, PipelineContext &context) |
| Make sure the texture in the given slot matches the texture definition given the current context. | |
Private Attributes | |
| video::IVideoDriver * | m_driver { nullptr } |
| std::vector< TextureDefinition > | m_definitions |
| core::array< video::ITexture * > | m_textures |
Static Private Attributes | |
| static const u8 | NO_DEPTH_TEXTURE = 255 |
Texture buffer represents a framebuffer with a multiple attached textures.
|
overridevirtual |
References m_driver, and m_textures.
|
private |
Make sure the texture in the given slot matches the texture definition given the current context.
| textureSlot | address of the texture pointer to verify and populate. |
| definition | logical definition of the texture |
| context | current context of the rendering pipeline |
References TextureBuffer::TextureDefinition::clear, TextureBuffer::TextureDefinition::dirty, errorstream, TextureBuffer::TextureDefinition::fixed_size, TextureBuffer::TextureDefinition::format, m_driver, TextureBuffer::TextureDefinition::msaa, TextureBuffer::TextureDefinition::name, sanity_check, TextureBuffer::TextureDefinition::scale_factor, TextureBuffer::TextureDefinition::size, PipelineContext::target_size, and TextureBuffer::TextureDefinition::valid.
Referenced by reset().
Here is the caller graph for this function:
|
overridevirtual |
Get a texture by index.
Returns nullptr is the texture does not exist.
Implements RenderSource.
References m_textures.
Referenced by TextureBufferOutput::activate(), and InitInterlacedMaskStep::run().
Here is the caller graph for this function:
|
inlineoverridevirtual |
|
overridevirtual |
Reimplemented from RenderPipelineObject.
References PipelineContext::device, ensureTexture(), m_definitions, m_driver, m_textures, and RenderPipelineObject::reset().
Here is the call graph for this function:| void TextureBuffer::setTexture | ( | u8 | index, |
| core::dimension2du | size, | ||
| const std::string & | name, | ||
| video::ECOLOR_FORMAT | format, | ||
| bool | clear = false, | ||
| u8 | msaa = 0 ) |
Configure fixed-size texture for the specific index.
| index | index of the texture |
| size | width and height of the texture in pixels |
| height | height of the texture in pixels |
| name | unique name of the texture |
| format | color format |
References m_definitions, and NO_DEPTH_TEXTURE.
Referenced by addUpscaling(), populateInterlacedPipeline(), and populateSideBySidePipeline().
Here is the caller graph for this function:| void TextureBuffer::setTexture | ( | u8 | index, |
| v2f | scale_factor, | ||
| const std::string & | name, | ||
| video::ECOLOR_FORMAT | format, | ||
| bool | clear = false, | ||
| u8 | msaa = 0 ) |
Configure relative-size texture for the specific index.
| index | index of the texture |
| scale_factor | relation of the texture dimensions to the screen dimensions |
| name | unique name of the texture |
| format | color format |
References m_definitions, and NO_DEPTH_TEXTURE.
| void TextureBuffer::swapTextures | ( | u8 | texture_a, |
| u8 | texture_b ) |
References m_definitions, and m_textures.
Referenced by SwapTexturesStep::run().
Here is the caller graph for this function:
|
private |
Referenced by reset(), setTexture(), setTexture(), and swapTextures().
|
private |
Referenced by ~TextureBuffer(), ensureTexture(), and reset().
|
private |
Referenced by ~TextureBuffer(), getTexture(), getTextureCount(), reset(), and swapTextures().
|
staticprivate |
Referenced by setTexture(), and setTexture().