(capture-gl-state)
Capture the current blending state of GL so we can draw NanoVG text (which blats the config) before restoring the original state for drawing images/shapes.
Capture the current blending state of GL so we can draw NanoVG text (which blats the config) before restoring the original state for drawing images/shapes.
(create-font vg name classpath-resource)
Load a .ttf from a classpath resource and register it as name
in
the NanoVG context vg
.
Load a .ttf from a classpath resource and register it as `name` in the NanoVG context `vg`.
(draw-text! {:keys [window vg vg-color default-font] :as state}
[x y]
content
&
{:keys [font font-size color rotation]
:or {font default-font font-size 32 color p/white rotation 0}})
(restore-gl-state {:keys [src-rgb src-alpha dst-rgb dst-alpha blend-enabled?]})
Restore the original blending state of GL for drawing images/shapes.
Restore the original blending state of GL for drawing images/shapes.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close