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
18
README.org
18
README.org
|
|
@ -137,21 +137,27 @@ Create a new render queue in ~render-queues~, where ~queue-name~ is the queue na
|
|||
#+begin_src scheme
|
||||
(push-render-object queue-name layer thunk)
|
||||
#+end_src
|
||||
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
|
||||
(evaluate-render-queue queue-name mode)
|
||||
(perform-render)
|
||||
*active-camera-2d*
|
||||
*active-camera-3d*
|
||||
#+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.
|
||||
|
||||
~perform-render~ iterates the ~render-priority~ association list and calls ~evaluate-render-queue~ on each queue in order with the appropriate mode.
|
||||
Parameters which describe the currently active camera for 2D and 3D drawing.
|
||||
|
||||
#+begin_src scheme
|
||||
*clear-color*
|
||||
#+end_src
|
||||
~*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
|
||||
(resolve-queues)
|
||||
#+end_src
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue