lTyl Posted November 8, 2019 Share Posted November 8, 2019 Howdy! I am finally starting the process of upgrading to PIXI v5. I have a few custom renderers written in V4, and made use of glCore.GLShader, glCore.GLBuffer, and glCore.VertexArrayObject quite heavily. In V4, I could import glCore from `pixi.js` and have what I need. In V5, is glCore still packaged with PIXI? If it is, where can I find it? If it is no longer included, does V5 provide similar helper methods or objects to make building custom renderers easier? I am aware of the migration guide: https://github.com/pixijs/pixi.js/wiki/v5-Migration-Guide but it doesn't go very low-level. Thanks! ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted November 8, 2019 Share Posted November 8, 2019 (edited) Its gone. But we have better things now! https://pixijs.io/examples/#/mesh-and-shaders/triangle-color.js Now you dont need actual WebGL context to create geometries, bufferes and shaders! Also, custom renderer is needed only for batching. Without batching, just single shader + custom render() method of Mesh or your class that extends mesh is fine! Extra material: custom batching renderer! https://www.pixiplayground.com/#/edit/~tlXTadqt1qCEvHf~cMQE Oh, i just noticed it doesnt draw red if we switch version to 5.2.0... It might be a bug, we are investigating it. Also, look through render() renderDefault() and that kind of methods of Graphics/Mesh/SimpleMesh. They show how can you actually use pixijs internals : texture binds, rendertexture binds, shader uniforms, in a new style. Basically, we have our own https://twgljs.org/ inside Edited November 8, 2019 by ivan.popelyshev Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted November 8, 2019 Share Posted November 8, 2019 Here, have a bonus explanation about WebGL basics: https://twitter.com/ivanpopelyshev/status/1192916824301735937 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted November 8, 2019 Share Posted November 8, 2019 OK, confirmation: 5.2.0 version is correct Quote Link to comment Share on other sites More sharing options...
lTyl Posted November 8, 2019 Author Share Posted November 8, 2019 (edited) @ivan.popelyshev Thanks for the answer (and the dump of information!). Do you think this material can get added to the V5 Migration Guide? (https://github.com/pixijs/pixi.js/wiki/v5-Migration-Guide) I'm not too sure how many people worked with glCore before for custom renderers but this is useful information and might help someone down the line Edited November 8, 2019 by lTyl Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted November 8, 2019 Share Posted November 8, 2019 Yes, a bit later. I'm very busy this week Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.