Can't load image before init canvas #25

finscn opened this Issue Oct 9, 2012 · 2 comments


None yet

3 participants

finscn commented Oct 9, 2012

if I load some images before get the canvas and context , sometimes the image will be blank.


var ima=new Image()

var canvas=document.getElementById("canvas")
var ctx=canvas.getContext("2d")

there are no error,no warning,but can't display the image


Yep, see the documentation.

This should probably be fixed in the long run. Maybe by allowing to re-size the canvas element after getting the context and creating a default context before the index.js is executed. I'll look into it.

nmtitov commented Nov 7, 2012

this should be written with huge red letters on the very first doc page

@phoboslab phoboslab added a commit that closed this issue Nov 14, 2012
@phoboslab Fix #25 - create the GL context as soon as the App starts, so that te…
…xtures can be loaded without a ScreenCanvas
@phoboslab phoboslab closed this in 7ad9728 Nov 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment