Tim,
> My point was that this should be a very clear choice. Especially when
> deciding between "as Ptr" and "ByRef as Ptr". They're worlds apart. On the
> other hand, "as Ptr" and "as MemoryBlock" are practically equivalent.
LOL, like sort of pregnant, I got it, I misunderstood you.
> Some guidance:
>
>> float domain[2];
>> float range[8];
>
> float is a 4-byte entity, so the equivalent MemoryBlocks are
>
> domain= new MemoryBlock(8)
> range = new MemoryBlock(32)
Right, I know this, I posted this,
aDomain = New MemoryBlock(2 * 4)
aDomain.SingleValue(0) = 0.0
aDomain.SingleValue(1 * 4) = 1.0
<snip>
> I honestly hope that is helpful.
Absolutely yes, very much so! I'll copy this to my notes and digest it
further, again, many thank you's for taking the time to reply. I hope it can
get my shading to draw correctly.
And if I may press my luck, does any of this advice change when the
MemoryBlock is of an unknown type? Such as,
void *info
Charles,
> The sample code looks like it's passing an array of size 2 to
> CGFunctionCreate to me...
The code crashes for me if I pass 2. The notes indicate that "Dimension of
Domain is 1 and dimension of range is 4." The docs for this function say,
"An array of (2*domainDimension) floats ..." So, it is expecting 1 in this
case. Ditto for the range, it should be 4.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>