Skip to content

ITexture#

Renderer-friendly image representation.

Header:#include <AUI/Render/ITexture.h>
CMake:aui_link(my_target PUBLIC aui::views)

Examples#

examples/app/game_of_life/src/main.cpp

Game of Life - Game of Life implementation that uses advanced large dynamic data rendering techniques such as ITexture, AImage to be GPU friendly. The computation is performed in AThreadPool.

    int getContentMinimumHeight() override { return mCells->size().y * SCALE; }

private:
    _<Cells> mCells;
    _<ITexture> mTexture;

    void updateTexture() {
        if (!mTexture) {
            mTexture = AWindow::current()->getRenderingContext()->renderer().getNewTexture();
        }

Public Methods#

setImage#


virtual void ITexture::setImage(AImageView image)

Copies image to the texture image representation (i.e. to GPU memory).

Examples#

examples/app/game_of_life/src/main.cpp

Game of Life - Game of Life implementation that uses advanced large dynamic data rendering techniques such as ITexture, AImage to be GPU friendly. The computation is performed in AThreadPool.

                            ? AColor::WHITE
                            : AColor::TRANSPARENT_BLACK));
            }
        }
        mTexture->setImage(image);
        redraw();
    }
}; /// end

class GameOfLifeWindow : public AWindow {