Hi, OGL doesn't work out of the box with offscreen canvas but I got it to work by modifying Renderer.js. Orbit too but but that's in extras.
From this line until the end of setSize needs to be commented out and the canvas' width and height need to be set manually to match the width and height passed into the renderer.
I fully expected there to be other issues but for the life of me I can't figure out why the FPS suffers when it should all be on the GPU. Weird thing is that there are microtasks generated when running the offscreen canvas vs not. I have no idea why.
Anyways, I'm not sure if this is OGL related I just wanted to put this out there in case someone else ran into the problem.
Hi, OGL doesn't work out of the box with offscreen canvas but I got it to work by modifying Renderer.js. Orbit too but but that's in extras.
From this line until the end of setSize needs to be commented out and the canvas' width and height need to be set manually to match the width and height passed into the renderer.
https://github.com/oframe/ogl/blob/e518a8290c7981921abbb2a9844e841d12fba122/src/core/Renderer.js#L118
I fully expected there to be other issues but for the life of me I can't figure out why the FPS suffers when it should all be on the GPU. Weird thing is that there are microtasks generated when running the offscreen canvas vs not. I have no idea why.
Anyways, I'm not sure if this is OGL related I just wanted to put this out there in case someone else ran into the problem.
Thanks for the awesome library!