Jump to content

Where is glCore in PIXI v5? (pixi.js-legacy)


lTyl
 Share

Recommended Posts

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!

Link to comment
Share on other sites

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 by ivan.popelyshev
Link to comment
Share on other sites

@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 by lTyl
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...