LWJGL Forum

Programming => Bug Reports / RFE => Topic started by: oakes on October 17, 2020, 18:08:28

Title: Why use Dyncall instead of JNA?
Post by: oakes on October 17, 2020, 18:08:28
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 (https://javadoc.lwjgl.org/org/lwjgl/system/dyncall/package-summary.html). 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?
Title: Re: Why use Dyncall instead of JNA?
Post by: spasi on October 18, 2020, 11:27:31
LWJGL uses JNI for downcalls (Java calling C). Dyncall is only used for upcalls (C calling Java).