Closed skymen closed 4 months ago
Hi there, I think a duplicate version of the Renderer class (the class which handles the gl context, gl state and rendering) would be necessary. The main issues I can see with sharing gl context between different libs are:
I could be wrong, but it sounds like you could maybe find a solution by making a copy of Renderer.js which receives a gl context, doesn't store any local state (i.e performs all gl calls no matter what), and renders to a render target, which is then the output.
Hi,
I just found out about this project which is perfect for what I needed. I am currently looking into implementing it as part of Construct 3's rendering pipeline because it integrates nicely with WebGL 1/2 and C3 has some amount of simple 2D focused 3D features that would benefit from having something like OGL to cover the blind spots.
I would love to be able to give OGL the C3 gl object and have it plug into it, do its thing, and send it back to C3, but it doesn't seem to work right now.
This would be great because this is exactly how Effekseer handles rendering for example where it seamlessly plugs into any webGL rendering pipeline and it was relatively simple to get it to work.
Alternatively, I could implement Effekseer as part of my OGL implementation, and then render the OGL scene to a render target that I then pass to C3 for rendering. It would work, but then that means C3 will render the OGL scene as a flat texture decorrelated from its own 3D rendering, which means I then can't render sprites between OGL 3D models using a shared depth buffer, so I would need to do multiple OGL renders, or mix OGL 3D and C3 3D for some parts, and if I need to layer 2D elements, have all of them be done in OGL which would be less convenient.
For the project I'm working with, rendering to a renderTarget is good enough, but I would really prefer to have a better integrated 3D rendering in the future if possible. I would appreciate tips and knowledge on the topic and if it's even possible with how OGL is currently designed.
Thanks again for this lib :)