chuigda / vulkan4j

Vulkan bindings for Java using Project-Panama (java.lang.foreign) APIs
BSD 3-Clause "New" or "Revised" License
8 stars 0 forks source link

Is `Array` a `Ptr`? #3

Closed chuigda closed 1 week ago

chuigda commented 1 week 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 1 week ago

Yes.