HumbleUI / Skija

Java bindings for Skia
Apache License 2.0
514 stars 34 forks source link

How do we add Metal Kit Device to the surface and render #65

Closed marvinh closed 10 months ago

marvinh commented 10 months ago

Apple has the following cpp headers available

include <Metal/Metal.hpp>

include <AppKit/AppKit.hpp>

include <MetalKit/MetalKit.hpp>

is how we access metal kit device in cpp but how do we pass this the the long in skija MTL::Device* _pDevice;

tonsky commented 10 months ago

I’m not sure what exactly are you asking, but does this help?

https://github.com/HumbleUI/JWM/blob/a04867c5f45b126caafe9abccd9ecd00d3bc516f/macos/java/LayerMetal.java#L62-L65 https://github.com/HumbleUI/JWM/blob/a04867c5f45b126caafe9abccd9ecd00d3bc516f/macos/java/skija/LayerMetalSkija.java#L19 https://github.com/HumbleUI/Skija/blob/a63330f37f24d57b457e625d861b121689c8d182/shared/java/DirectContext.java#L16

marvinh commented 10 months ago

Yes thank you this is exactly it ! is their a way to view the api without looking at source code ?

tonsky commented 10 months ago

Not really