Issue/1648 (#1668)

This commit is contained in:
Tim Sylvester
2023-09-21 08:52:33 -07:00
committed by GitHub
parent 2e36dcfcb4
commit fc73b16a73
9 changed files with 40 additions and 61 deletions

View File

@@ -75,7 +75,11 @@ struct Buffer {
GLuint buffer = 0;
};
#if MLN_LEGACY_RENDERER
TEST(OffscreenTexture, RenderToTexture) {
#else
TEST(OffscreenTexture, DISABLED_RenderToTexture) {
#endif
if (gfx::Backend::GetType() != gfx::Backend::Type::OpenGL) {
return;
}
@@ -167,7 +171,11 @@ void main() {
test::checkImage("test/fixtures/offscreen_texture/render-to-fbo", image, 0, 0);
// Now, composite the Framebuffer texture we've rendered to onto the main FBO.
#if MLN_LEGACY_RENDERER
gl::bindTexture(context, 0, {texture.getTexture().getResource(), gfx::TextureFilterType::Linear});
#else
// TODO: Implement based on gfx::Texture2D
#endif
MBGL_CHECK_ERROR(glUseProgram(compositeShader.program));
MBGL_CHECK_ERROR(glUniform1i(u_texture, 0));
MBGL_CHECK_ERROR(glBindBuffer(GL_ARRAY_BUFFER, viewportBuffer.buffer));