Add active camera and clear-background documentation
This commit is contained in:
parent
edd3d24160
commit
1ce9c49086
1 changed files with 12 additions and 6 deletions
16
README.org
16
README.org
|
|
@ -140,18 +140,24 @@ Create a new render queue in ~render-queues~, where ~queue-name~ is the queue na
|
||||||
Adds a thunk to the given render queue name at the given layer. ~queue-name~ must be a symbol, ~layer~ must be an integer, and ~thunk~ must be a zero-argument procedure.
|
Adds a thunk to the given render queue name at the given layer. ~queue-name~ must be a symbol, ~layer~ must be an integer, and ~thunk~ must be a zero-argument procedure.
|
||||||
|
|
||||||
#+begin_src scheme
|
#+begin_src scheme
|
||||||
(evaluate-render-queue queue-name mode)
|
*active-camera-2d*
|
||||||
(perform-render)
|
*active-camera-3d*
|
||||||
#+end_src
|
#+end_src
|
||||||
Functions for evaluating the render queues. ~evaluate-render-queue~ evaluates a single queue where ~queue-name~ is a symbol corresponding to a queue in the ~render-queues~, and ~mode~ is a drawing mode symbol (either ~screen~, ~2d~, or ~3d~). The given queue is cleared after evaluation.
|
Parameters which describe the currently active camera for 2D and 3D drawing.
|
||||||
|
|
||||||
~perform-render~ iterates the ~render-priority~ association list and calls ~evaluate-render-queue~ on each queue in order with the appropriate mode.
|
|
||||||
|
|
||||||
#+begin_src scheme
|
#+begin_src scheme
|
||||||
*clear-color*
|
*clear-color*
|
||||||
#+end_src
|
#+end_src
|
||||||
~*clear-color*~ is a parameter which expects a u8vector corresponding to a Raylib color.
|
~*clear-color*~ is a parameter which expects a u8vector corresponding to a Raylib color.
|
||||||
|
|
||||||
|
#+begin_src scheme
|
||||||
|
(evaluate-render-queue queue-name mode)
|
||||||
|
(perform-render)
|
||||||
|
#+end_src
|
||||||
|
Functions for evaluating the render queues. ~evaluate-render-queue~ evaluates a single queue where ~queue-name~ is a symbol corresponding to a queue in the ~render-queues~, and ~mode~ is a drawing mode symbol (either ~screen~, ~2d~, or ~3d~). The given queue is cleared after evaluation, and each thunk in the render queue is evaluated with the appropriate mode, using the ~*active-camera-2d*~ and ~*active-camera-3d*~ for the ~2d~ and ~3d~ drawing modes.
|
||||||
|
|
||||||
|
~perform-render~ clears the screen to the set ~*clear-color*~, then iterates the ~render-priority~ association list and calls ~evaluate-render-queue~ on each queue in order with the appropriate mode.
|
||||||
|
|
||||||
#+begin_src scheme
|
#+begin_src scheme
|
||||||
(resolve-queues)
|
(resolve-queues)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue