Skip to content
Mark Knol edited this page Mar 25, 2014 · 8 revisions

Flambe's WebGL renderer is enabled by default for html target (since Flambe 3), for better performance. Browsers without WebGL will fallback seamlessly to 2D canvas.

There are some minor differences between the 2D canvas and WebGL renderers you should know:

  • The canvas renderer snaps to the nearest whole pixel when drawing, for performance. The WebGL renderer does not, which means smoother animation, but sprites positioned on subpixels will be aliased slightly.
  • The WebGL renderer doesn't perform mipmapping at the moment, so large images that are scaled down may appear aliased.
  • WebGL is not supported on most mobile webbrowsers.

To disable the WebGL, open your .yaml file, and add this flag haxe_flags: -D flambe_disable_webgl. If you target only for WebGL, you could choose to disable canvas with this flag: flambe_disable_canvas

More on Conditional compilation

Clone this wiki locally