Selectable renderer implementation (#1247)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
mwilsnd
2023-06-26 15:49:48 -05:00
committed by Bart Louwers
parent fe165c8924
commit 1963697687
64 changed files with 1189 additions and 316 deletions

View File

@@ -96,6 +96,7 @@ std::optional<ImagePosition> RenderTile::getPattern(const std::string& pattern)
return renderData->getPattern(pattern);
}
#if MLN_DRAWABLE_RENDERER
static const gfx::Texture2DPtr noTexture;
bool RenderTile::hasGlyphAtlasTexture() const {
@@ -129,6 +130,28 @@ const std::shared_ptr<TileAtlasTextures>& RenderTile::getAtlasTextures() const {
return renderData ? renderData->getAtlasTextures() : noAtlas;
}
#else
gfx::TextureBinding RenderTile::getGlyphAtlasTextureBinding(gfx::TextureFilterType filter) const {
assert(renderData);
return {getGlyphAtlasTexture()->getResource(), filter};
}
gfx::TextureBinding RenderTile::getIconAtlasTextureBinding(gfx::TextureFilterType filter) const {
assert(renderData);
return {getIconAtlasTexture()->getResource(), filter};
}
const gfx::Texture* RenderTile::getGlyphAtlasTexture() const {
assert(renderData);
return &renderData->getGlyphAtlasTexture();
}
const gfx::Texture* RenderTile::getIconAtlasTexture() const {
assert(renderData);
return &renderData->getIconAtlasTexture();
}
#endif
void RenderTile::upload(gfx::UploadPass& uploadPass) const {
assert(renderData);
renderData->upload(uploadPass);