I’m trying to draw to more than one color buffer in the CPlusPlus TOP using the OpenGLTOP example and am getting stuck. The many references to color buffers/Renderbuffers in the source files lead me to think this is supported, but I’m obviously missing something.
In the TOP_Context declaration, it says:
If I set the CPlusPlus TOP to have >1 color buffers (before loading the .dll) and print some relevant information to the console:
The default scene doesn’t render with >1 color buffer, I assume due to TOP_OutputFormatSpecs::colorBuffer0Type changing from GL_TEXTURE_2D to GL_RENDERBUFFER.
This gives me hope, but only one buffer exists. How do I make more that work with glDrawBuffersARB()?
Sorry for the long post, any help is greatly appreciated. Thank you!
Is this working for CUDA in the last experimental build (2019.36502) ? I’m getting numColorbuffers = 0 and only cudaOutputs[0] is allocated regardless the number of color buffers I select.
@malcolm this is still true right, only one buffer for cuda mode?
In TOP_CPlusPlusBase.h seeing
// Only used when executeMode == TOP_ExecuteMode::OpenGL_FBO
for numColorBuffers
Though this comment feels there could be multiple output buffers for cuda :
// Write to this CUDA memory to fill the output textures
cudaArray* const cudaOutput[32];
Just hit this issue myself when working in CUDA. Even if numColorBuffers is increased, and the ‘# of color buffers’ parameters set to 2, nothing other than cudaOuput[0] appears to be instantiated.