phoboslab / Ejecta

A Fast, Open Source JavaScript, Canvas & Audio Implementation for iOS
2.81k stars 322 forks source link

WebGL example doesn't render (black screen) #636

Closed darknoon closed 8 years ago

darknoon commented 8 years ago

Steps to repro:

Expected result: Demo renders

Actual result: Black screen

Discussion: It appears that the framebuffer is getting unbound in -[EJCanvasContextWebGLScreen resizeToWidth:height:]

Fixing it seems to be a touch involved, but I started messing around with keeping EJ_WEBGL_DEFAULT_RENDERBUFFER set in boundRenderbuffer and the same for the framebuffer to try to have it get fixed in -prepare, but I'm not familiar with all of the state management code here.

phoboslab commented 8 years ago

Thanks!