a-big-triangle icon indicating copy to clipboard operation
a-big-triangle copied to clipboard

The cache check now targets correct buffer

Open marklundin opened this issue 8 years ago • 4 comments

gl-buffer has a property called handle not buffer. This was causing the cache validation to fail

marklundin avatar Oct 28 '15 16:10 marklundin

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 avatar Feb 03 '16 14:02 Prinzhorn

@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.

mikolalysenko avatar Feb 03 '16 19:02 mikolalysenko

I think I botched this PR, but if I rember correctly it was recreating every time

marklundin avatar Feb 03 '16 21:02 marklundin

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

Prinzhorn avatar Feb 04 '16 07:02 Prinzhorn