Liking cljdoc? Tell your friends :D

gdx-loopy.core

A simple game loop for libgdx

A simple game loop for libgdx
raw docstring

global-loopclj

As libgdx applications are global. We may as well have some state to hold the current loop and provide you a reference to the running application.

As libgdx applications are global. We may as well have some state to hold the current loop
and provide you a reference to the running application.
raw docstring

listenerclj

(listener frame-fn)
(listener frame-fn on-resize-fn)

Takes a render function frame-fn and optionally an on-resize function and returns an ApplicationListener that can be used to start a new game loop.

Exceptions thrown in the render thread will be caught and printed. Make sure to implement your own error handling.

Takes a render function `frame-fn` and optionally an `on-resize` function
and returns an ApplicationListener that can be used to start a new game loop.

Exceptions thrown in the render thread will be caught and printed. Make sure to implement
your own error handling.
raw docstring

listener-loop!clj

(listener-loop! listener)
(listener-loop! listener config)

Takes a listener and starts a game loop on a new thread. You can pass config as a map.

The keys supported currently by config and their defaults are: :width 1024, :height 768, :fullscreen? false :title "Untitled" :vsync? false :max-fps 60 :resizable? false

Unfortunately libgdx will only allow this fn to run once for the entire application process.

Takes a listener and starts a game loop on a new thread.
You can pass config as a map.

The keys supported currently by config and their defaults are:
:width 1024,
:height 768,
:fullscreen? false
:title "Untitled"
:vsync? false
:max-fps 60
:resizable? false

Unfortunately libgdx will only allow this fn to run once for the entire application process.
raw docstring

loop!clj

(loop! f)
(loop! f config)

Takes a fn to call every frame and starts a game loop on a new thread. You can pass config as a map.

The fn will be called every frame with NO arguments.

The keys supported currently by config and their defaults are: :width 1024, :height 768, :fullscreen? false :title "Untitled" :vsync? false :max-fps 60 :resizable? false :on-resize-fn nil

Unfortunately libgdx will only allow this fn to run once for the entire application process.

Takes a fn to call every frame and starts a game loop on a new thread.
You can pass config as a map.

The fn will be called every frame with NO arguments.

The keys supported currently by config and their defaults are:
:width 1024,
:height 768,
:fullscreen? false
:title "Untitled"
:vsync? false
:max-fps 60
:resizable? false
:on-resize-fn nil

Unfortunately libgdx will only allow this fn to run once for the entire application process.
raw docstring

map->lwjgl-configurationclj

(map->lwjgl-configuration m)

on-render-threadcljmacro

(on-render-thread & forms)

Runs the forms on the render thread. Returns a promise that will yield the result of the last form.

If there is no loop taking tasks - an exception will be thrown.

Runs the forms on the render thread. Returns a promise that will yield
the result of the last form.

If there is no loop taking tasks - an exception will be thrown.
raw docstring

on-render-thread-callclj

(on-render-thread-call f)

Runs the fn f on the render thread. Returns a promise that will yield the result of the function call once it has been completed.

If there is no loop taking tasks - an exception will be thrown

Runs the fn `f` on the render thread. Returns a promise that will yield
the result of the function call once it has been completed.

If there is no loop taking tasks - an exception will be thrown
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close