Hi,
I am doing something step by step like this:
- Create a RT_BUFFER_INPUT_OUTPUT type optix::Buffer
- Launch to compute and write data to the buffer
- Assign the buffer to a optix::TextureSampler
- Using the texture when launch ray tracing
My question is:
- When I am doing step 3, the program just crashed... why @@!?
- When I create a new buffer with RT_BUFFER_INPUT_OUTPUT type (A brand new, without write anything into it), and assign to the textureSampler. It will correctly caught exception without crashed: OptiX Error: 'Unknown error (Details: Function "_rtTextureSamplerSetBuffer" caught exception: Assertion failed: "m_iotype == RT_BUFFER_INPUT", file: , line: 453)' Why the behavior is not the same
- How to get type from optix::Buffer? The interface only can get format, size... etc.
- How to assign the RT_BUFFER_INPUT_OUTPUT type optix::Buffer to optix::TextureSampler? I currenty copy the data to another RT_BUFFER_INPUT type buffer before step 3 to avoid the problem...