target FPS

This commit is contained in:
BirDt_ 2026-04-04 14:36:40 +08:00
parent 1ce9c49086
commit 6f9e0a934f
2 changed files with 11 additions and 1 deletions

View file

@ -172,15 +172,18 @@ Functions for evaluating the render queues. ~evaluate-render-queue~ evaluates a
#+begin_src
*window-size*
*window-title*
*target-fps*
#+end_src
~*window-size*~ is a parameter that expects a cons pair of two integers, where the first integer is the window width, and the second is the window height.
~*window-title*~ is a parameter that expects a string, which is used for the window title.
~*target-fps*~ is a parameter that expects an integer, which specifies the desired frames per second to run at.
#+begin_src scheme
(create-window process: (next-frame) close-predicate: (window-should-close?))
#+end_src
~create-window~ creates a window using the window parameters described above, then enters a loop which runs the ~process:~ function (~next-frame~ by default) on each frame, unless ~close-predicate:~ (Raylib's ~window-should-close~ function by default) returns true, in which case the window is closed.
~create-window~ creates a window using the window parameters described above, sets the target frames per second, then enters a loop which runs the ~process:~ function (~next-frame~ by default) on each frame, unless ~close-predicate:~ (Raylib's ~window-should-close~ function by default) returns true, in which case the window is closed.
* Dependencies
The following Chicken dependencies are required: