Interface TextureUploader<H>
- Type Parameters:
H- the host's opaque texture-handle type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Uploads decoded image bytes into a host-managed GPU texture and returns an opaque host handle. The
handle type
H is whatever the host renderer uses (for example a NanoVG image handle, or a
Skija texture reference) — the library treats it as opaque and never inspects it.
Always invoked on the main/render thread; the library marshals via MainThreadExecutor
before calling.
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionupload(InputStream imageBytes) Uploads an image and returns its handle.
-
Method Details
-
upload
Uploads an image and returns its handle.- Parameters:
imageBytes- a stream over a complete encoded image (PNG)- Returns:
- the host texture handle, or
nullif the upload failed - Since:
- 0.1.0
-