Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

IFOPNGL bugs

dbruceg
Beginner
460 Views
I just translated some simple OGL stuff from Mesa to IFOPNGL and hit a few bugs. Specifically, fglLoadMatrixd and fglLoadMatrixf declare their arguments to be scalar integers
integer(4) m
rather than the respective
real(8) m(4,4)
and
real(4) m(4,4)
Since you've given us the source, fixes are easy. I'll continue to report them under this thread unless someone tells me not to bother.

Bruce
0 Kudos
3 Replies
Steven_L_Intel1
Employee
460 Views
It's not a bug, the coding is intentional, but I'll agree that it could be improved. As written, fglLoadMatrixd expects to be passed the address of an array by value - that is, LOC(array). Most of the Win32 API declarations we inherited from Microsoft did this, and if we simply changed it, then existing code would break. This is why we invented such things as IGNORE_LOC and started making some Win32 API routines generic. But it's a long and manual process to find and enhance all of them.

If you changed these routines in the manner you suggest, it would work, though you should add the IGNORE_LOC attribute to maintain compatibility with older code. Note, though, that the fact that the argument is an array means that it is always passed by reference. If there was a routine with a scalar argument, you'd have to add a REFERENCE attribuite.

Please send Win32 API issues as you find them to me at steve.lionel at intel.com rather than posting here.
0 Kudos
dbruceg
Beginner
460 Views
Steve:
Thanks for the cogent explanation. Being used to Mesa's standard FORTRAN calls, I just assumed they were bugs. I think I'll change the interfaces back to their original form so I don't have to hit IFOPNGL every time I update IFORT.
Bruce

0 Kudos
Steven_L_Intel1
Employee
460 Views
Ok - if you use LOC(array), it will continue to work once we have "fixed" the interface.
0 Kudos
Reply