[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] 2d canvas context to WebGL
FWIW, Construct 2 uses texImage2D with a 2D canvas to render text. Since WebGL doesn't have built-in text rendering, rendering text to a 2D canvas then copying it to a WebGL texture can be useful (note DOM text doesn't allow you to draw over text or process text effects in the WebGL context). If the text content changes every frame, it has to call texImage2D with a 2D canvas every frame. I don't think many games are realistically bottlenecked on that and it's fairly easy to work around, but it's a major use case for that particular overload.