Author Topic: Low-Level  (Read 2028 times)

0 Members and 1 Guest are viewing this topic.

Peter

  • Guest
Low-Level
« on: April 06, 2013, 11:04:19 AM »
Deleted
« Last Edit: May 07, 2015, 11:08:41 AM by Peter »

Charles Pegge

  • Guest
Re: Low-Level
« Reply #1 on: April 06, 2013, 12:52:51 PM »
You may use quad* for QueryPerformanceCounter if you so wish.

Charles Pegge

  • Guest
Re: Low-Level
« Reply #2 on: April 07, 2013, 07:36:31 PM »

When functions are unprototyped,  compund types will be passed byref, and strings will be passed by strptr, floating-pt numbers are passed as double.

Opengl uses both floats and doubles for many of its params, so prototypes are needed here. Also some array values have to be passed byref.

Here is a demo of what happens when a rectangle is passed to an unprototype function

type rectangle long left,top,right,bottom

function f(...)
indexbase 1
rectangle r at param[1]
print r.left "   " r.top "   " r.right "   " r.bottom
end function


rectangle t={10,20,30,40}

f t   'auto pass byref
f @t  'explicit pass byref