[core] add getResource template to gfx::*Resource classes

This commit is contained in:
Konstantin Käfer
2019-04-02 22:47:24 +02:00
parent c02010ab6c
commit ebd8508032
20 changed files with 117 additions and 74 deletions

View File

@@ -143,7 +143,7 @@ void RenderLineLayer::render(PaintParameters& parameters, RenderSource*) {
posA,
posB,
LinePatternProgram::TextureBindings{
textures::image::Value{ *geometryTile.iconAtlasTexture->resource, gfx::TextureFilterType::Linear },
textures::image::Value{ geometryTile.iconAtlasTexture->getResource(), gfx::TextureFilterType::Linear },
});
} else if (!unevaluated.get<LineGradient>().getValue().isUndefined()) {
if (!colorRampTexture) {
@@ -159,7 +159,7 @@ void RenderLineLayer::render(PaintParameters& parameters, RenderSource*) {
{},
{},
LineGradientProgram::TextureBindings{
textures::image::Value{ *colorRampTexture->resource, gfx::TextureFilterType::Linear },
textures::image::Value{ colorRampTexture->getResource(), gfx::TextureFilterType::Linear },
});
} else {
draw(parameters.programs.getLineLayerPrograms().line,