elm-explorations / webgl

Functional rendering with WebGL in Elm
https://package.elm-lang.org/packages/elm-explorations/webgl/latest/
BSD 3-Clause "New" or "Revised" License
116 stars 17 forks source link

Cache attribute locations for a program #26

Closed w0rm closed 4 years ago

w0rm commented 4 years ago

It seems that gl.getProgramParameter, gl.getActiveAttrib, gl.getAttribLocation can be cached for each program and not called for each draw.

This could improve the performance a little bit.