# Render external framework's canvas as texture

**URL:** <https://forum.babylonjs.com/t/render-external-frameworks-canvas-as-texture/16744>\
**Category:** Questions\
**Tags:** material\
**Created:** [December 18, 2020, 1:44pm UTC](https://forum.babylonjs.com/t/render-external-frameworks-canvas-as-texture/16744 "2020-12-18T13:44:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Knackstedt](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/andrew_knackstedt/32/12589_2.png) [@Andrew\_Knackstedt](https://forum.babylonjs.com/u/Andrew_Knackstedt)\
**Post date:** [December 18, 2020, 1:44pm UTC](https://forum.babylonjs.com/t/render-external-frameworks-canvas-as-texture/16744/1 "2020-12-18T13:44:39Z")

</div>

I’m trying to render two external canvases as live textures in BJS.

These are dynamic canvases that respond to clicks and some timed events. I can’t initialize them by passing in a canvas context object.

I’ve tried using an HtmlElementTexture, but it is always black when it gets applied.

What am I doing wrong here?

This is a playground showing a completely black rendering.

> **[Babylon.js Playground](https://playground.babylonjs.com/#MJFAP1%231)**

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [December 18, 2020, 2:32pm UTC](https://forum.babylonjs.com/t/render-external-frameworks-canvas-as-texture/16744/2 "2020-12-18T14:32:53Z")

</div>

First you need to refresh the texture each time the canvas change with update and also you need to be carefull in the playground creation of pCanvas:

> **[Babylon.js Playground](https://playground.babylonjs.com/#MJFAP1%235)**

---

<div class="post-metadata">

**Author:** ![Andrew\_Knackstedt](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/andrew_knackstedt/32/12589_2.png) [@Andrew\_Knackstedt](https://forum.babylonjs.com/u/Andrew_Knackstedt)\
**Post date:** [December 18, 2020, 3:13pm UTC](https://forum.babylonjs.com/t/render-external-frameworks-canvas-as-texture/16744/3 "2020-12-18T15:13:48Z")

</div>

You’re awesome, sebavan! Thanks for the help!
