{"record":{"id":"395a8ba07dfdf9e2","repo":"slint-ui/slint","slug":"internal-error-missing-implementation-for-opengl-surface","errorCode":null,"errorMessage":"internal error: missing implementation for BorrowedOpenGLTextureOrigin","messagePattern":"internal error: missing implementation for BorrowedOpenGLTextureOrigin","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/renderers/skia/opengl_surface.rs","lineNumber":206,"sourceCode":"            );\n            texture_info.format = glow::RGBA8;\n            let backend_texture = skia_safe::gpu::backend_textures::make_gl(\n                (size.width as _, size.height as _),\n                skia_safe::gpu::Mipmapped::No,\n                texture_info,\n                \"Borrowed GL texture\",\n            );\n            skia_safe::image::Image::from_texture(\n                canvas.recording_context().as_mut().unwrap(),\n                &backend_texture,\n                match origin {\n                    i_slint_core::graphics::BorrowedOpenGLTextureOrigin::TopLeft => {\n                        skia_safe::gpu::SurfaceOrigin::TopLeft\n                    }\n                    i_slint_core::graphics::BorrowedOpenGLTextureOrigin::BottomLeft => {\n                        skia_safe::gpu::SurfaceOrigin::BottomLeft\n                    }\n                    _ => unimplemented!(\n                        \"internal error: missing implementation for BorrowedOpenGLTextureOrigin\"\n                    ),\n                },\n                skia_safe::ColorType::RGBA8888,\n                skia_safe::AlphaType::Unpremul,\n                crate::sampled_texture_color_space(crate::TextureEncoding::Unorm),\n            )\n        }\n    }\n}\n\nimpl OpenGLSurface {\n    pub fn new_with_config(\n        window_handle: Arc<dyn raw_window_handle::HasWindowHandle>,\n        display_handle: Arc<dyn raw_window_handle::HasDisplayHandle>,\n        size: PhysicalWindowSize,\n        requested_opengl_version: Option<RequestedOpenGLVersion>,\n        config_builder: glutin::config::ConfigTemplateBuilder,","sourceCodeStart":188,"sourceCodeEnd":224,"githubUrl":"https://github.com/slint-ui/slint/blob/3a7e700487dc74d404cad0726378053ab763d4e0/internal/renderers/skia/opengl_surface.rs#L188-L224","documentation":"The Skia OpenGL surface's `import_opengl_texture` maps `BorrowedOpenGLTextureOrigin` to `skia_safe::gpu::SurfaceOrigin` and only implements TopLeft and BottomLeft; other variants hit the wildcard `unimplemented!` panic. An internal completeness guard in the Skia backend.","triggerScenarios":"Importing an external OpenGL texture into a Slint Skia-rendered window with an origin variant other than TopLeft or BottomLeft (e.g. BottomRight, TopRight).","commonSituations":"Passing texture origin values taken from another engine's conventions directly into the Skia backend's texture import API.","solutions":["Use only BorrowedOpenGLTextureOrigin::TopLeft or BottomLeft with this API","Pre-transform (flip) the texture and declare TopLeft/BottomLeft accordingly","Extend opengl_surface.rs to map remaining origin variants to Skia equivalents"],"exampleFix":"// before\nrenderer.import_opengl_texture(win, BorrowedOpenGlTexture::new(tex, size, BorrowedOpenGLTextureOrigin::BottomRight))\n// after\nrenderer.import_opengl_texture(win, BorrowedOpenGlTexture::new(tex, size, BorrowedOpenGLTextureOrigin::BottomLeft))","handlingStrategy":"validation","validationCode":"let origin_ok = matches!(origin,\n    BorrowedOpenGLTextureOrigin::TopLeft | BorrowedOpenGLTextureOrigin::BottomLeft);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Map non-vertical origin variants to TopLeft/BottomLeft before importing with Skia","Verify origin semantics when porting code between renderers","Add a debug assertion narrowing the origin enum in your texture-import helper"],"tags":["skia","opengl","rendering"],"backgroundTag":"unsupported-enum-value","analyzedSha":"3a7e700487dc74d404cad0726378053ab763d4e0","analyzedAt":"2026-09-16T01:37:20.251Z","contentChangedAt":"2026-09-16T01:37:20.251Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}