I was just wondering what the more efficient method of exposing macOS class functions and properties for items that could be used a lot, eg metal rendering.
Should i create a external method:
Private Function EX_arrayLength(p as Integer) as integer
Which sets the selector etc, and is called by
Public Property arrayLength as integer Get #if TargetMacOS then return EX_arrayLength(me.Handle) #endif End Get Set End Set End Property
OR is this ok.
Public Property arrayLength as integer Get #if TargetMacOS then soft declare function getValue lib QuartzCore selector "arrayLength" (p as integer) as integer return getValue(me.Handle) #endif End Get Set End Set End Property
I was wondering when external functions are resolved, on each call, or on first call, or on startup.
If i was rendering a scene as fast as possible and say the arraylength property was being got a lot on each render, which would be the best pratice for getting the values?