You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per one of my previous posts, I've been working on a large mesh rendering pipeline using chunked LoD. I've heavily modified the code in the webglrenderer to treat my objects as immediate rendering objects, and hence initiate the rendering callback on each frame render pass... I'm doing quite a bit of optimization steps, such as reusing mesh vbos and morphing them in the vertex shaders, packing (interleaving) attributes together into larger buffers, ... This gives me a smooth 60fps across the board, but obviously means not much of the original renderBufferImmediate code remains the same.
So what I'd like to propose/implement is a more generalized immediate rendering mode, where the low-level control is available for these specialized cases, and each implementation basically provides its own renderBufferImmediate code. The big question I have however: is this even possible? For a custom render function to be registered into the WebGL renderer, that function would need access to the _gl context and such, which is passed in to the WebGL renderer functions by closure. Is there any way to expose this context in callback functions without extensive changes to the renderer (e.g. without making all of the relevant variables actual members of the renderer etc...)
thanks!
The text was updated successfully, but these errors were encountered:
Hi group,
As per one of my previous posts, I've been working on a large mesh rendering pipeline using chunked LoD. I've heavily modified the code in the webglrenderer to treat my objects as immediate rendering objects, and hence initiate the rendering callback on each frame render pass... I'm doing quite a bit of optimization steps, such as reusing mesh vbos and morphing them in the vertex shaders, packing (interleaving) attributes together into larger buffers, ... This gives me a smooth 60fps across the board, but obviously means not much of the original renderBufferImmediate code remains the same.
So what I'd like to propose/implement is a more generalized immediate rendering mode, where the low-level control is available for these specialized cases, and each implementation basically provides its own renderBufferImmediate code. The big question I have however: is this even possible? For a custom render function to be registered into the WebGL renderer, that function would need access to the _gl context and such, which is passed in to the WebGL renderer functions by closure. Is there any way to expose this context in callback functions without extensive changes to the renderer (e.g. without making all of the relevant variables actual members of the renderer etc...)
thanks!
The text was updated successfully, but these errors were encountered: