borodust / cl-bodge

Feature-rich game framework for Common Lisp
http://borodust.org/projects/cl-bodge/
MIT License
174 stars 14 forks source link

Add OpenGL state tracking #67

Closed borodust closed 7 years ago

borodust commented 7 years ago

Wrap poiu text rendering backend into this. At the moment of writing:

    (gl:enable :scissor-test)
    (gl:blend-func-separate :src-alpha :one-minus-src-alpha :zero :one)
    (gl:scissor 0.0 0.0 (width-of poiu) (height-of poiu))
    (dolist (cmd (nreverse commands))
      (case (command-type cmd)
        (:scissor (apply-pretext-scissors cmd poiu))
        (:text (render-boxed-text cmd poiu))))
    (gl:blend-func :src-alpha :one-minus-src-alpha)
    (gl:disable :scissor-test)
borodust commented 7 years ago

Hackish, ad-hoc implementation, but probably would suffice for a trivial stuff.