{"record":{"id":"a883f9926e937fc8","repo":"slint-ui/slint","slug":"internal-error-missing-implementation-for","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/femtovg/images.rs","lineNumber":174,"sourceCode":"                    };\n                    canvas.borrow_mut().create_image(&html_image.dom_element, image_flags).unwrap()\n                } else {\n                    return None;\n                }\n            }\n            #[cfg(not(target_arch = \"wasm32\"))]\n            ImageInner::BorrowedOpenGLTexture(BorrowedOpenGLTexture {\n                texture_id,\n                size,\n                origin,\n                ..\n            }) => {\n                let image_flags = match origin {\n                    i_slint_core::graphics::BorrowedOpenGLTextureOrigin::TopLeft => image_flags,\n                    i_slint_core::graphics::BorrowedOpenGLTextureOrigin::BottomLeft => {\n                        image_flags | femtovg::ImageFlags::FLIP_Y\n                    }\n                    _ => unimplemented!(\n                        \"internal error: missing implementation for BorrowedOpenGLTextureOrigin\"\n                    ),\n                };\n                canvas\n                    .borrow_mut()\n                    .create_image_from_native_texture(\n                        <R as TextureImporter>::convert_opengl_texture(*texture_id),\n                        femtovg::ImageInfo::new(\n                            image_flags,\n                            size.width as _,\n                            size.height as _,\n                            femtovg::PixelFormat::Rgba8,\n                        ),\n                    )\n                    .unwrap()\n            }\n            #[cfg(feature = \"unstable-wgpu-30\")]\n            ImageInner::WGPUTexture(i_slint_core::graphics::WGPUTexture::WGPU30Texture(","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/slint-ui/slint/blob/3a7e700487dc74d404cad0726378053ab763d4e0/internal/renderers/femtovg/images.rs#L156-L192","documentation":"The FemtoVG renderer only knows how to import a borrowed native OpenGL texture with `TopLeft` or `BottomLeft` origin. Any other `BorrowedOpenGLTextureOrigin` value (the enum has more variants) reaches the wildcard arm and panics. This is an internal completeness check in the renderer.","triggerScenarios":"Calling the public `new_from_image` / borrowed-OpenGL-texture image import API (e.g. `BorrowedOpenGLTexture`/`BorrowedOpenGlTexture` from the Rust API) with a texture origin variant other than TopLeft or BottomLeft, such as `BottomRight` or `TopRight`.","commonSituations":"Porting code from another renderer (e.g. Skia) that supports more origins; supplying a flipped/rotated texture origin enum value directly to the FEMtoVG backend.","solutions":["Pass only BorrowedOpenGLTextureOrigin::TopLeft or BottomLeft to the FemtoVG renderer","Map your texture's actual origin to one of the supported values (apply flips yourself before import)","Extend images.rs to translate the remaining origin variants into femtovg::ImageFlags"],"exampleFix":"// before\nlet img = BorrowedOpenGlTexture::new(texture_id, size, BorrowedOpenGLTextureOrigin::BottomRight);\n// after\nlet img = BorrowedOpenGlTexture::new(texture_id, size, BorrowedOpenGLTextureOrigin::TopLeft);","handlingStrategy":"validation","validationCode":"fn is_supported(origin: BorrowedOpenGLTextureOrigin) -> bool {\n    matches!(origin, BorrowedOpenGLTextureOrigin::TopLeft | BorrowedOpenGLTextureOrigin::BottomLeft)\n}","typeGuard":"fn supported_origin(o: BorrowedOpenGLTextureOrigin) -> Option<BorrowedOpenGLTextureOrigin> {\n    matches!(o, TopLeft | BottomLeft).then_some(o)\n}","tryCatchPattern":null,"preventionTips":["Only use TopLeft/BottomLeft origins with the FemtoVG renderer","Flip textures in your own code before importing","Consult the BorrowedOpenGLTextureOrigin docs per-renderer before choosing a value"],"tags":["opengl","femtovg","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"}