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
Could we save render.calls and render.triangles in the store? In this way we don't break code which relies on that number.
Possible workaround
constinfo=usePerf((state)=>state.gl?.info)useFrame((state)=>{const{ camera, gl, scene }=stategl.render(scene,camera)console.log(info.render.frames)},1)
I'm not sure though if this can cause some issue. Do gl.render() gets called twice in this way? Once for useFrame(...,1) and then for useFrame(..., Infinity)?
Issue
https://codesandbox.io/s/r3f-perf-issue-with-gl-0do0bm
I think this is because of the
gl.info.reset()
in https://github.com/utsuboco/r3f-perf/blob/main/src/components/PerfHeadless.tsx#L262Possible fix
Could we save
render.calls
andrender.triangles
in the store? In this way we don't break code which relies on that number.Possible workaround
I'm not sure though if this can cause some issue. Do
gl.render()
gets called twice in this way? Once foruseFrame(...,1)
and then foruseFrame(..., Infinity)
?r3f-perf/src/components/Graph.tsx
Lines 202 to 216 in 6497ade
The text was updated successfully, but these errors were encountered: