Hello, I'm rendering a threejs scene onto a texture that I'm using in ImGui as part of my interface system. I need a way to access the underlying WebGLTexture or FBO to easily add the texture onto a pure WebGL interface (ImGui). Here is roughly what the code looks like that I'm dealing with:
// Setting and rendering to the target...
this.renderTarget.setSize(this.size.x, this.size.y);
render.setRenderTarget(this.renderTarget);
render.render(this.scene, this.camera);
render.setRenderTarget(null);
// Usage of the texture (API I want to call)
function Image(user_texture_id: WebGLTexture, size: Bind.interface_ImVec2);
So, the WebGL API I'm using takes a WebGLTexture, but renderTarget.texture is a threejs object that does not appear to expose the WebGLTexture or FBO, what's the suggested way to convert this? Thanks : )