Skip to content
This repository has been archived by the owner on Oct 20, 2020. It is now read-only.

Unnecessary GL states call at "end of Renderer:draw" frame(up and above 18 gl state calls) #399

Closed
Kuranes opened this issue Aug 4, 2015 · 1 comment

Comments

@Kuranes
Copy link
Collaborator

Kuranes commented Aug 4, 2015

repro steps:
run a sample, capture a glTrace with gl inspector, see all call after the last gl.DrawElement to end of frame.

Comment State.apply here:

state.apply();

re-run same sample, capture a gltrace with glinspector.

And see that all the unnecessary calls are removed.

All samples/tutorial runs well without but "multiple viewer" sample

But it shouldn't be enabled in all the other use case, as GL call are very costly (and pollute gl traces)

In case of FOG sample, half the gl call are unnecessary (18/36).

if use case is to "revert webgl state to a neutral state", better just share the "lastapplied" states thing between frame/viewers as it would allows for even fewer states on usecase where states are always the same during and between frames/viewers.)

@cedricpinson
Copy link
Owner

Since a lot of stuff has been fixed to avoid duplicate state, it should be fixed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants