Re: [elm-discuss] Help needed using canvas to render text in WebGL - stuck with how to use the virtual dom

2016-08-31 Thread roovo
yep - that's what I'm after and despite elm-webgl only supporting png/jpg's - in fact if you pass a canvas element in as a texture then elm-webgl will it handle fine as a texture - hence my bit of experimentation with some native js code to do this... but the sticking point (for me atm) is

Re: [elm-discuss] Help needed using canvas to render text in WebGL - stuck with how to use the virtual dom

2016-08-31 Thread roovo
Excellent - thanks for the info and link looks most cool indeed :) - just had a play - looking forward to being able to write something as capable at what you've got there (and as well organised code-wise). One of my colleagues at work suggested the same approach (as why would you put text

Re: [elm-discuss] Help needed using canvas to render text in WebGL - stuck with how to use the virtual dom

2016-08-31 Thread Nick H
o i c. So you want to place the text on the surface of a 3D object, and have it change? elm-webgl only supports loading textures from PNGs and JPEGs. On Wed, Aug 31, 2016 at 11:15 AM, roovo wrote: > Hey Nic

Re: [elm-discuss] Help needed using canvas to render text in WebGL - stuck with how to use the virtual dom

2016-08-31 Thread roovo
Hey Nick (and thanks) the reason I'm using canvas is that I don't believe that you can pass a regular DOM element to web-gl for use as a texture - however this is my first foray into webgl so I am on a (pretty steep) learning curve and it may be that I have just not found out that you can yet..

Re: [elm-discuss] Help needed using canvas to render text in WebGL - stuck with how to use the virtual dom

2016-08-31 Thread Nick H
My into-the-heavens project is using HTML divs to overlay text on a WebGL canvas (link to relevant code ). This has worked fine for my needs, but my needs are pretty boring. Maybe you want to do something cool & crazy

Re: [elm-discuss] Help needed using canvas to render text in WebGL - stuck with how to use the virtual dom

2016-08-31 Thread Nick H
Why do you want to render text using a canvas texture instead of the DOM? It seems like making a pure Elm function that places text in a div would give you the same results and would still integrate fine with elm-webgl. As for your specific question, I suspect the answer is no, but I don't know en

[elm-discuss] Help needed using canvas to render text in WebGL - stuck with how to use the virtual dom

2016-08-31 Thread roovo
Hi I've recently been learning/hacking/having fun with elm and webgl and have been experimenting with rendering text using canvas textures. It seems that this is not possible using elm-graphics as it renders text using the DOM and not canvas, so I have slapped together a proof of concept (cur