a-big-triangle
a-big-triangle copied to clipboard
The cache check now targets correct buffer
gl-buffer has a property called handle not buffer. This was causing the cache validation to fail
I'm new to WebGL and use this lib. Does that mean we're currently creating garbage buffers 60 times a second? I mean it's not leaking memory but it's still garbage that needs to be collected right?
@Prinzhorn not sure, but if true that is bad. I'm leaving a comment here to remind myself to check this tonight when I get home.
I think I botched this PR, but if I rember correctly it was recreating every time
It was added by this commit https://github.com/mikolalysenko/a-big-triangle/commit/9da847fbf56f49ab84dfbed576ed56ab30f176d6 with good intentions but I believe the second condition is now always true because triangleVAO._triangleBuffer.buffer is undefined as this pr says.
Reference that there's a handle prop https://github.com/stackgl/gl-buffer#bufferhandle