Simul Support ExchangeCategory: CloudsUsing External Color and Depth textures
Nick.Simultec asked 2 weeks ago

Hi Community,
 
I am having issues with using external textures. I set something like:
mExternalOsgDepth->InitFromExternalTexture2D(mRenderPlatform, (void*)(mOsgExternalDepth->getTextureObject(0)->id()), nullptr, false, true, simul::crossplatform::UNKNOWN, false, false, true, 1);
mExternalOsgColor->InitFromExternalTexture2D(mRenderPlatform, (void*)(mOsgExternalColor->getTextureObject(0)->id()), nullptr, false, true, simul::crossplatform::UNKNOWN, false, false, true, 1);
mHDR_MSAA_Fbo->SetExternalTextures(mExternalOsgColor, mExternalOsgDepth);
 
And I am still getting black image as an output. The attached snapshots are the checks of my external textures and the output without and with using these calls. Any hints? What is the expected color and depth format? 
 
Thanks a bunch for any hint!


 
Cheers,
Nick
 
 

2 Answers
Nick.Simultec answered 2 weeks ago
Nick.Simultec replied 2 weeks ago

I have debugged the code I have (I am using evaluation) and it is crashing in FramebufferGL::Activate. It seams that SetExternalTextures is creating the buffers well, but not setting mFBOId vector which in Activate is used. Maybe this can be a pointer I hope

Nick.Simultec replied 2 weeks ago

Hi again,

I have managed to give the renderer my external color buffer to render to and it works. However I really struggle with the external Depth. I have re-engineered lots of the code as hacks to make this work but I will really need some hints how to make it work with external Depth. What is the magic there?

Thanks a buch!

Cheers,
Nick

Nick.Simultec replied 2 weeks ago

Finally I was able to make it works with external buffers. I had to mimic snippets from the source in my own app and here is the result

https://pasteboard.co/JVtEqjA.jpg

I am still having issues with flipped buffers and I am wondering if there is some setting to work with

Thank you again

Nick

Nick.Simultec answered 2 weeks ago

I managed it with my client app to flip the buffer. It was a journey :). I am closing this issue
https://pasteboard.co/JVuoBT0.jpg