openfl/openfl — pull request #373 by mrcdk (2014-10-29 22:32:44+00:00)
Title: WebGL Graphics API implementation

Hello people, I've been working on an openGL Graphics API implementation and, while it isn't finished yet, I want to make it public for you to test and report back any problem you encounter.

The implementation uses the stencil buffer to draw the filling of the polygons, ellipses, etc. so you will need to add to your `project.xml` the following bit because it's disabled by default:
```xml

```
The only problem with using the stencil buffer is that the filling will be aliased. I'm still looking for ways to enable some kind of anti-aliasing on them.

The implemented functions are:
* `lineStyle()`: Only `thickness`, `color` and `alpha`. `caps`, `joints` and `miterLimit` will be in the near future. There are some problems with the line rendering like gaps where it shouldn't be. Hopefully the new approach I will try will solve them.
* `beginFill()`: Fully implemented.
* `beginBitmapFill()`: Fully implemented but `html5` where the `repeat` flag will be ignored if the `bitmapData` isn't a power of two image (it's a limitation of the WebGL standard)
* `moveTo()`, `lineTo()`, `curveTo()`, `cubicCurveTo()`: Fully implemented.
* All the basic `draw*()` functions like `drawRect()`, `drawEllipse()`, etc.
* `drawTriangles()`: Only works with `beginBitmapFill()`.

The bits that aren't implemented are:
* Caching the drawing to a bitmap.
* Finishing `lineStyle()`
* Implement `drawTiles()`
* Finishing `drawTriangles()`
* Find a way to implement some kind of anti-aliasing (probably in conjunction with the caching of the bitmap)