Why use Dyncall instead of JNA?

Started by oakes, October 17, 2020, 18:08:28

Previous topic - Next topic

oakes

This isn't a bug report or criticism -- I'm just curious. After reading the LWJGL code, it looks like all native functions are called via Dyncall. Why not just use JNA for this purpose? In both cases, they allow you to call native functions without modifying them (unlike JNI). Does Dyncall have some kind of performance advantage over JNA?

spasi

LWJGL uses JNI for downcalls (Java calling C). Dyncall is only used for upcalls (C calling Java).