so lime.ui.Window
has a renderer
property Which is most often set to OPENGL
.
I look here…:
enum RenderContext {
OPENGL (gl:#if (!flash || display) GLRenderContext #else Dynamic #end);
CANVAS (context:CanvasRenderContext);
DOM (element:#if ((!js && !html5) || display) DOMRenderContext #else Dynamic #end);
FLASH (stage:#if ((!js && !html5) || display) FlashRenderContext #else Dynamic #end);
CAIRO (cairo:#if ((!js && !html5) || display) CairoRenderContext #else Dynamic #end);
CONSOLE (context:#if ((!js && !html5) || display) ConsoleRenderContext #else Dynamic #end);
CUSTOM (data:Dynamic);
NONE;
}
…and I see other renderers so I think that I can use easier ones like CANVAS
to draw to the screen, but when I try to create a new canvas renderer with…:
override public function onWindowCreate(win:Window):Void {
var c:CanvasRenderContext;
c = new CanvasRenderContext();
var r:Renderer = new Renderer(win);
var ctx:RenderContext = RenderContext.CANVAS(c);
r.context = ctx;
r.type = RendererType.CANVAS;
addRenderer(r);
trace(r);
}
…r
appears to be empty an empty array.
So is it possible to use other renderers? if so which renderers are for each platform… what do each of them mean or do… and how do I make and set new renderers?
If not possible… is there a nifty tutorial for OpenGL with Lime? (because I really don’t understand OpenGL at all )
Thanks in advance!