- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok - if you use LOC(array), it will continue to work once we have "fixed" the interface.
![](/skins/images/B7BA37F9CE4B52FF7CAE1FB0388839C8/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page