void Render() { using namespace oglplus; gl.Clear().ColorBuffer().StencilBuffer(); glc.Color(0.2, 0.2, 1.0); text_path.StencilFillInstanced( glyph_indices, PathNVFillMode::CountUp, 0xFF, PathNVTransformType::TranslateX, glyph_spacings); text_path.CoverFillInstanced( glyph_indices, PathNVFillCoverMode::BoundingBoxOfBoundingBoxes, PathNVTransformType::TranslateX, glyph_spacings); glc.Color(0.0, 0.0, 0.0); text_path.StencilStrokeInstanced( glyph_indices, 1, ~0, PathNVTransformType::TranslateX, glyph_spacings); text_path.CoverStrokeInstanced( glyph_indices, PathNVStrokeCoverMode::ConvexHull, PathNVTransformType::TranslateX, glyph_spacings); }
void Render(void) { using namespace oglplus; gl.Clear().ColorBuffer().StencilBuffer(); glc.Color(0.2, 0.2, 1.0); path.StencilFill(PathNVFillMode::CountUp, 0x1F); path.CoverFill(PathNVFillCoverMode::BoundingBox); glc.Color(0.1, 0.1, 0.1); path.StencilStroke(1, ~0); path.CoverStroke(PathNVStrokeCoverMode::ConvexHull); }
void Display(void) { using namespace oglplus; gl.Clear().ColorBuffer(); glc.Begin(CompatibilityPrimitiveType::Triangles); glc.Color(1.0, 0.0, 0.0); glc.Vertex(0.0f, 0.0f); glc.Color(0.0, 1.0, 0.0); glc.Vertex(1.0f, 0.0f); glc.Color(0.0, 0.0, 1.0); glc.Vertex(0.0f, 1.0f); glc.End(); }