[x3d-public] loading X3DOM and X_ITE on same page. Conflicts with frame buffers? [was: RE: JSON parser]

John Carlson yottzumm at gmail.com
Sat Mar 17 17:31:07 PDT 2018


Okay, I have a smaller example here:

https://coderextreme.net/X3DJSONLD/src/main/html/flipper2.html

(press the Load button several times…it might be in the lower left corner.)

X_ITE seems to bail out here:

x_ite.js:77145 Error: Couldn't create frame buffer.
    at new DepthBuffer (x_ite.js:51297)
    at Layer.X3DRenderObject (x_ite.js:77141)
    at Layer.X3DLayerNode [as constructor] (x_ite.js:80092)
    at new Layer (x_ite.js:80560)
    at new LayerSet (x_ite.js:80674)
    at new World (x_ite.js:80897)
    at X3DBrowser.setExecutionContext (x_ite.js:81220)
    at X3DBrowser.replaceWorld (x_ite.js:114277)
    at loaderJQuery.js:222
    at fire (x_ite.js:5425)

Any ideas?  Ideally, it would reuse the DepthBuffer of the old world, I would hope.  Not really sure though.

John
Sent from Mail for Windows 10

From: John Carlson
Sent: Saturday, March 17, 2018 8:09 PM
To: Holger Seelig
Subject: RE: JSON parser

I’ve tried duplicating with 2 canvases and XML and JS loaders without success.  Will try full X3DOM and X_ITE next.


John

Sent from Mail for Windows 10

From: John Carlson
Sent: Saturday, March 17, 2018 7:54 PM
To: Holger Seelig
Subject: RE: JSON parser

Holger, have you tried these APIs with more than 16 or so invocations…enough to fill the number of WebGL contexts? On a single web page?  I start getting black canvases as I reload 2 different browser canvases with different worlds.   This applied to previous versions of X_ITE and Cobweb as well.

See: https://coderextreme.net/X3DJSONLD/src/main/html/index.html (select 5 or so items from the pulldown in succession).

This would be a great boon to my development if we could solve this. I wouldn’t have to reload the page.  It’s getting to the point with EXI, etc. that I am running out of WebGL contexts rapidly, I think, and X_ITE or X3DOM should reclaim them (it looks like X3DOM does, but not sure if it gives them to X_ITE).

Or whatever is going on.   Please advise if you’ve seen it before with these APIs.

Thanks,

John

Sent from Mail for Windows 10

From: Holger Seelig
Sent: Wednesday, March 14, 2018 1:36 PM
To: John Carlson
Subject: Re: JSON parser

Thank you for your mail,

I created a test page which will test all three cases following your 
examles. The page works well in Chrome and Firefox and will also work in 
Edge.

Have also tested your JSON loader with some special files (PROTO, IMPORT 
EXPORT ...) and everything is fine.

Best regards,
Holger

Am 04.03.2018 um 13:52 schrieb John Carlson:
> These are my interfaces to X_ITE from JavaScript.  At least 2 of these 
> get stuck loading.  As far as I know, these work with 4.1.3.
> 
> John
> 
> function load_X_ITE_XML(content) {
> 
>          X3D(function() {
> 
>                  var browser = X3D.getBrowser("#x_itexml");
> 
>                  browser.replaceWorld(browser.createX3DFromString(content));
> 
>          }, function() {
> 
>                  alert("Failed to render XML to X_ITE");
> 
>          });
> 
> }
> 
> function load_X_ITE_DOM(element, browserSelector) {
> 
>          X3D(function() {
> 
>                  if (typeof X3D.getBrowser !== 'undefined') {
> 
>                          var browser = X3D.getBrowser("#x_itedom");
> 
>                          if (typeof browser !== 'undefined' && typeof 
> browser.importDocument !== 'undefined') {
> 
>                                  var importedScene = 
> browser.importDocument(element);
> 
>                                  browser.replaceWorld(importedScene);
> 
>                          }
> 
>                  }
> 
>          }, function() {
> 
>                  alert("Failed to render DOM to X_ITE");
> 
>          });
> 
> }
> 
> function load_X_ITE_JS(jsobj, browserSelector) {
> 
>          X3D(function() {
> 
>                  if (typeof X3D.getBrowser !== 'undefined') {
> 
>                          var browser = X3D.getBrowser("#x_itejson");
> 
>                          if (typeof browser !== 'undefined' && typeof 
> browser.importJS !== 'undefined') {
> 
>                                  var importedScene = 
> browser.importJS(jsobj);
> 
>                                  browser.replaceWorld(importedScene);
> 
>                          }
> 
>                  }
> 
>          }, function() {
> 
>                  alert("Failed to render JSON to X_ITE");
> 
>          });
> 
> }



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180317/8d2d8284/attachment-0001.html>


More information about the x3d-public mailing list