Login  Register

Re: upcoming semantical change for buffer operations

Posted by Sven Gothel on Feb 19, 2011; 4:33pm
URL: https://forum.jogamp.org/upcoming-semantical-change-for-buffer-operations-tp2519021p2534243.html

On Saturday, February 19, 2011 17:31:50 Sven Gothel wrote:

> On Thursday, February 17, 2011 21:30:07 Michael Bien [via jogamp] wrote:
> >
> > a more concrete example would look like:
> >
> >             CLBuffer<FloatBuffer> src =
> > context.createFloatBuffer(preparedNIOBuffer);
> >             CLBuffer<FloatBuffer> dst =
> > context.createFloatBuffer(preparedNIOBuffer.capacity());
> >            
> >             int src_offset = 12; // ignore first 12 floats
> >             int dst_offset = 0;
> >             //now
> >             queue.putCopyBuffer(src, dst, src_offset*SIZEOF_FLOAT,
> > dst_offset, (src.capacity()-src_offset)*SIZEOF_FLOAT);
> >            
> >             //after the change
> >             queue.putCopyBuffer(src, dst, src_offset, dst_offset,
> > src.capacity()-src_offset);
> >
> >             queue.finish();
> >
>
> yup cool .. and as we discussed, the alignment / row-pitch values in bytes,
> if appropriate / exists.
>

forgot to nitpick .. IMHO it's more an addition
not a semantical change, since the original method signature will be still available right ?

~Sven