chuigda / vulkan4j

Vulkan bindings for Java using Project-Panama (java.lang.foreign) APIs
http://vulkan4j.7dg.tech/
BSD 3-Clause "New" or "Revised" License
16 stars 0 forks source link

Is `Array` a `Ptr`? #3

Closed chuigda closed 2 months ago

chuigda commented 2 months ago

According to Liskov replacement principle, we can make Array classes subclasses of Ptr classes. So for commands/fields that expects a Ptr we can use Array for that. Also this removes the necessity of ofPtr method.

chuigda commented 2 months ago

Yes.