Both copy constructor and assign operator use shallow copy with ref counting, so internally the GPU buffer used is same, and you can not use the same buffer as input and output.
I know that when I make temp like:
::brook::Stream *temp=new ::brook::Stream(1,&dimension);
then I can use assign method and everything would be alright.
The only thing that bothers me is that I can't get dimensions from Stream class.
So I see that there is StreamImpl class that has getDimensions but how can I get StreamImpl from Stream object. There is an operator *() that returns StreamImpl* object from Stream but if I do this then I get the error:
use of undefined type 'StreamImpl'
from the compiler. Even if I declare it on the top of the file like so:
There is no StreamImpl.h that I could include in my project.
Thank you for your help.
OK, nevermind. I added the method getDimenions() to class Stream myself.
It works fine.