Updated to B28 and lost access to Context.createTexture2D

75 views
Skip to first unread message

skaug...@gmail.com

unread,
May 19, 2014, 5:51:26 PM5/19/14
to cesiu...@googlegroups.com
Hey, I just updated to B28 and realized that access to context was made private for some reason. I was generating a polar radar image from binary data over websockets using scene.context.createTexture2D, but I no longer have access to this function. Did it get moved somewhere else? Is the Context now accessible some other way?

Thanks.

Patrick Cozzi

unread,
May 21, 2014, 4:59:07 PM5/21/14
to cesiu...@googlegroups.com, skaug...@gmail.com
Hi,

createTexture2D was made private in the documentation but it is still there and will continue to be there in one form or another.  We removed it from the doc since it is a low-level function that may change in the future.

Patrick

skaug...@gmail.com

unread,
May 21, 2014, 5:34:08 PM5/21/14
to cesiu...@googlegroups.com, skaug...@gmail.com
Hi Patrick,

How do I access createTexture2D?

Previously I was using:
viewer.scene.context.createTexture2D({width:512, height:1024});

This no longer works in B28 because "context" is no longer available under "scene".

Thanks

Patrick Cozzi

unread,
May 21, 2014, 5:37:03 PM5/21/14
to cesiu...@googlegroups.com



--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/4dylJA-25LM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

skaug...@gmail.com

unread,
May 21, 2014, 5:43:34 PM5/21/14
to cesiu...@googlegroups.com
Interesting, when I try to access viewer.scene.context, it tells me that context is undefined.

Patrick Cozzi

unread,
May 21, 2014, 5:47:06 PM5/21/14
to cesiu...@googlegroups.com
If you are on b28, try _context.  In master and future versions, it is context.

Patrick

skaug...@gmail.com

unread,
May 21, 2014, 5:48:54 PM5/21/14
to cesiu...@googlegroups.com
Aha! That did it. I'll check if context is undefined and use _context if it is.

Thanks Patrick!

zailus...@gmail.com

unread,
Nov 1, 2015, 10:29:49 AM11/1/15
to cesium-dev
在 2014年5月22日星期四 UTC+8上午5:47:06,Patrick Cozzi写道:
Hi Patrick,
I'm a beginner of cesium and the version I'm using is 1.12 in which I can't find the function 'viewer.scene.context'. Can you tell me some detailed descriptions of the function and how to use it in new versions?
Thanks.

zailus...@gmail.com

unread,
Nov 1, 2015, 10:31:29 AM11/1/15
to cesium-dev

Patrick Cozzi

unread,
Nov 1, 2015, 10:45:15 AM11/1/15
to cesiu...@googlegroups.com
Hi,


However, context is marked `@private` meaning it is not part of the public Cesium API and may change from release to release.

Patrick
Reply all
Reply to author
Forward
0 new messages