On Apr 30, 2007, at 11:16 PM, Thomas Cunningham wrote: >> Here, either declaration should work. This is just a US v. Canadian >> thing. > > LOL, Got it, eh? ;-) > >> In your code, I'd suggest replacing 1 and 4 with aDomain.Size\4 and >> aRange.Size\4. > > I think you've hit on my error here. Dividing by 4 gives me 2 and 8 > respectively, not correct. > > Here is a bit of the code I'm duplicating. > > float domain[2];
This is a C array of size 2; you need to use an eight-byte MemoryBlock. > float range[8]; This is a C array of size 8; you need to use an 32-byte MemoryBlock. > > domain[0] = 0; > domain[1] = 1; > > For domain, in order to get the single values in to Rb I have, > > aDomain = New MemoryBlock(2 * 4) > aDomain.SingleValue(0) = 0.0 > aDomain.SingleValue(1 * 4) = 1.0 Looks correct to me. > > >> Finally, the MemoryBlock infoPtr needs to live for as long as it's >> needed -- are you keeping a reference to it in a property somewhere? > > Yes, the docs mention this. :-) Again, I'm getting the first part > of the > shade object (geometry) to draw in an appropriate axial manner, but > the > second aspect, color, is wrong. So, if you can give me a clue how > to get two > floats in a MemoryBlock of size 4, I'm all ears. Thank you Charles, > Norman. The sample code looks like it's passing an array of size 2 to CGFunctionCreate to me... Charles Yeomans _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
