Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Resource icon

RPG Maker WebGL BufferData Error fix 1.0

No permission to download
THIS PLUGIN IS NOT REQUIRED FOR RPG MAKER MV PROJECTS VERSIONS ABOVE 1.3.0 (11th August 2016 onwards)

Fixes the error as described by Companion Wolf here.

This will override the WebGL core method for buffer uploads. Will not affect canvas rendering in any way.

Very minimal, so performance impact should be near zero and because it overrides Pixi.js it should still work after the MV developers update 1.3 to fix this error (although by then you should remove this Plugin).

Activate simply by adding the Plugin. Should work in any order (as long as no other Plugins override WebGL core).

This fix simply reimplements the original Buffer.prototype.upload method, but changes line 2898 from being "else" to being;
JavaScript:
} else if ( data.byteLength > 0 ) {
This will make sure that an allocate is only attempted if there is actual data in the buffer.

This works fine because the buffer's name has already been pregenerated so the moment data actually has contents the bufferData call will occur. bufferSubData will only get called if the incoming data size is less than the stored data size, which will only cause a crash if the incoming data size is a negative number but the current stored data size is zero (unlikely to happen, but this code isn't 100% safe because of that one case).

NOTE: The about message for this Plugin is technically incorrect. Whilst the call that leads to the problem happens by the MV original code, the problem itself is within Pixi.js so the responsibility of fixing the problem is either party in this case.
I would expect Pixi to fix this problem first.
Author
Xilefian
Downloads
58
Views
351
First release
Last update
Rating
5.00 star(s) 2 ratings

More resources from Xilefian

Latest reviews

Perfectly fixes the error. Thank you!
Xilefian
Xilefian
The 1.3.1 official MV update also fixes the error, so this Plugin is not necessary.

I'm keeping it here for legacy support reasons.
Top notch! Thank you!
Top