Upgrade OpenGL backend to ES 3.0 (#995)

Co-authored-by: Tadej Novak <tadej@tano.si>
This commit is contained in:
mwilsnd
2023-04-13 16:24:45 -05:00
committed by GitHub
parent 569791b310
commit 4828cc7a8b
115 changed files with 760 additions and 1159 deletions

View File

@@ -82,20 +82,7 @@ void RenderHeatmapLayer::render(PaintParameters& parameters) {
assert(colorRampTexture);
if (!renderTexture || renderTexture->getSize() != size) {
renderTexture.reset();
if (parameters.context.supportsHalfFloatTextures) {
renderTexture = parameters.context.createOffscreenTexture(size, gfx::TextureChannelDataType::HalfFloat);
if (!renderTexture->isRenderable()) {
// can't render to a half-float texture; falling back to unsigned byte one
renderTexture.reset();
parameters.context.supportsHalfFloatTextures = false;
}
}
if (!renderTexture) {
renderTexture = parameters.context.createOffscreenTexture(size, gfx::TextureChannelDataType::UnsignedByte);
}
renderTexture = parameters.context.createOffscreenTexture(size, gfx::TextureChannelDataType::HalfFloat);
}
auto renderPass = parameters.encoder->createRenderPass(