In the Egloo drawing pipeline, the GlDrawable class controls what to draw.
In GLES terms, each drawable contains:
glDrawArrays logic, for example for using GL_TRIANGLE_FAN or GL_TRIANGLE_STRIPDrawables are very easy to implement. We offer a few implementations:
| Name | Description |
|---|---|
Gl2dDrawable |
Base class for 2D drawables, that have 2 coordinates per vertex. |
Gl3dDrawable |
Base class for 2D drawables, that have 3 coordinates per vertex. |
GlRect |
A 2D drawable made of four vertices. By default, it covers the entire viewport and is typically used for textures. |
GlPolygon |
A regular 2D polygon. For example: pentagon = GlPolygon(5). |
GlTriangle |
A regular 2D triangle, extending GlPolygon. |
GlSquare |
A 2D square, extending GlPolygon. |
GlCircle |
A 2D circle, implemented as a GlPolygon with 360 sides. |
GlRoundRect |
A 2D rounded rect, with customizable corners. |
Each drawable can have different methods to customize its appearance and behavior.