Jump to content

Is it possible to use babylonjs with other webgl framework ?


1glayfan
 Share

Recommended Posts

Hello all,

As I don't know webgl and html5 deep enough, I wonder if it's possible to use babylonjs and other webgl framework  on the same page (and same canvas).

It seems like this not possible to do as each framework has its own rendering engine, but someone please confirm this.

Another possibility is create 2 canvases, and dedicate each one for babylonjs and other framework. Same html page though. Is it viable ?

In particular the framework I would like to use is the mapbox geo api (https://www.mapbox.com/mapbox-gl-js/api).

Essentially this would add mapping functionality to your babylonjs app.

Thank you!

Link to comment
Share on other sites

Hello, babylon.js can be initialized on the same gl context as any other webgl framework

You do this by creating the engine like this:

var engine = new BABYLON.Engine(context)

But beware: as Babylon.js relies a lot on cache for performance reason, you will have to make sure to call engine.wipeCaches(true) everytime Babylon.js will render a frame

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