As per documentation there shouldn’t be any access to webgl or other except using the natives as stated here: FiveM documentation
So how does screenshot-basic access WebGL?
As per documentation there shouldn’t be any access to webgl or other except using the natives as stated here: FiveM documentation
So how does screenshot-basic access WebGL?
This page is about JavaScript client scripts, screenshot-basic uses NUI which runs in a browser context and has access to all those APIs.
https://docs.fivem.net/docs/scripting-manual/nui-development/
but they use WebGL/Three.js to actually capture the screenshot. If it only where in a NUI context wouldn’t it wouldn’t capture everything the client player sees instead it would only capture the NUI elements.
Because there’s a special sequence in WebGL which binds a texture to a buffer of the game view, this is implemented in NUI.