summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Use a single foreign object guardian.David Thompson2016-02-156-38/+109
| | | | | | | | | | | | | | | | | | | | | | Rather than each foreign resource type creating its own guardian, let's just use one instead so that there is only a single guardian to talk to each frame. * sly/guardian.scm: New file. * Makefile.am (SOURCES): Add it. * sly/game.scm (run-game-loop): Start guardian worker. * sly/render/mesh.scm (mesh-guardian): Delete. (free-mesh): New procedure. (make-mesh): Guard newly created meshes. * sly/render/shader.scm (shader-stage-guardian): Delete. (free-shader-stage): New procedure. (make-shader-stage): Guard newly created shader stages. (shader-guardian): Delete. (free-shader): New procedure. (make-shader): Guard newly created shaders. * sly/render/texture.scm (texture-guardian): Delete. (free-texture): New procedure. (make-texture): Guard newly created textures.
* examples: Add sprite batch example.David Thompson2016-02-131-0/+62
| | | | * examples/sprite-batch.scm: New file.
* Remove unused sly-init procedure.David Thompson2016-02-111-11/+1
| | | | * sly.scm (sly-init): Delete.
* Update README.David Thompson2016-02-111-14/+13
|
* TODO: Mark 4x4 matrix multiplication as DONE.David Thompson2016-02-111-1/+1
|
* Remove dead modules.David Thompson2016-02-113-287/+0
| | | | | | | | | These modules haven't been used in a long time, but were never deleted. Oops! * sly/render/model.scm: Delete. * sly/render/scene.scm: Delete. * Makefile.am (SOURCES): Remove them.
* Remove GSL dependency.David Thompson2016-02-114-86/+1
| | | | | | | * sly/config.scm.in (%libgslcblas): Delete. * sly/wrappers/gsl.scm: Delete. * Makefile.am (WRAPPER_SOURCES): Remove it. * configure.ac: Remove GSL configuration.
* math: transform: Perform matrix multiplication in Scheme.David Thompson2016-02-111-8/+136
| | | | | | | | No more GSL dependency! Thanks Andy Wingo, for unboxed floating point operations! * sly/math/transform.scm (matrix-ref, matrix-set!): Allow inlining. (transform*!): Reimplement in pure Scheme, no FFI call to GSL.
* TODO: Mark item as DONE.David Thompson2016-02-101-1/+1
|
* Update .dir-locals.el.David Thompson2016-02-101-1/+3
|
* examples: Update everything to use deferred GL resource loading.David Thompson2016-02-1010-293/+410
|
* signal: Add signal-map-maybe.David Thompson2016-02-101-1/+12
| | | | * sly/signal.scm (signal-map-maybe): New procedure.
* signal: Add signal-if.David Thompson2016-02-101-0/+4
| | | | * sly/signal.scm (signal-if): New syntax.
* game: Add on-start procedure.David Thompson2016-02-101-0/+11
| | | | * sly/game.scm (on-start): New procedure.
* render: framebuffer: Use the null texture within the null framebuffer.David Thompson2016-02-101-1/+2
| | | | | * sly/render/framebuffer.scm (null-framebuffer): Set texture to the null texture, rather than #f.
* render: framebuffer: Add framebuffer-null?David Thompson2016-02-101-0/+5
| | | | * sly/render/framebuffer.scm (framebuffer-null?): New procedure.
* audio: Adjust name of argument to load-sample.David Thompson2016-02-101-3/+3
| | | | * sly/audio.scm (load-sample): s/filename/file/
* Update TODO list.David Thompson2016-02-101-23/+88
|
* window: Initialize SDL window before opening.David Thompson2016-02-051-0/+2
| | | | | * sly/window.scm (open-window): Initialize SDL2 and the window before modifying it.
* guix: Update guile-sdl2 snapshot.David Thompson2016-02-051-2/+2
|
* render: font: Remove unused module imports.David Thompson2016-02-051-2/+0
|
* render: font: Add docstring for enable-fonts.David Thompson2016-02-051-3/+4
| | | | * sly/render/font.scm (enable-fonts): Add docstring.
* live-reload: Don't load anything if the game hasn't started.David Thompson2016-02-051-0/+3
| | | | | * sly/live-reload (with-live-reload): Ignore poll when game has not yet started.
* game: Add game started hook.David Thompson2016-01-271-2/+16
| | | | | * sly/game.scm (game-start-hook, game-started?): New variables. (run-game-loop): Run game-start-hook before loop starts.
* sprite: Add null-sprite.David Thompson2016-01-241-0/+4
| | | | * sly/render/sprite.scm (null-sprite): New variable.
* signal: Run newly added hooks immediately.David Thompson2016-01-121-2/+6
| | | | * sly/signal.scm (add-signal-hook!): Apply 'proc' immediately.
* window: Configure various OpenGL parameters.David Thompson2016-01-121-1/+6
| | | | | * sly/window.scm (init-window): Set OpenGL version to 3.2, explicitly set double buffering and vsync, and configure depth buffer size.
* window: Respect fullscreen setting.David Thompson2016-01-121-0/+1
| | | | | | | Rather than, you know, ignoring it completely. * sly/window.scm (open-window): Set the window to fullscreen mode, if requested.
* audio: Add #:loop? argument to play-music.David Thompson2016-01-121-2/+2
| | | | * sly/audio.scm (play-music): Add #:loop? keyword argument.
* game-loop: Process input events before each agenda tick.David Thompson2016-01-121-1/+1
| | | | | | | | In practice this wasn't very noticeable, but it is a bad idea to lock input event processing with the frame rate. * sly/game.scm (run-game-loop): Process input events before each call to 'agenda-tick!'.
* render: font: Add support for non-blended font rendering.David Thompson2016-01-121-4/+8
| | | | | * sly/render/font.scm (render-text): Add 'blended?' argument. (make-label): Add #:blended? keyword argument.
* Rename (sly record) to (sly records).David Thompson2016-01-122-2/+2
| | | | | | * sly/record.scm: Delete. * sly/records.scm: New file. * Makefile.am (SOURCES): Remove deleted file. Add new file.
* render: Add alpha value to render context.David Thompson2016-01-122-2/+7
| | | | | | | | | Necessary for interpolating moving objects to avoid temporal aliasing. * sly/render.scm (<graphics>)[alpha]: New field. (graphics-alpha, set-graphics-alpha!): New procedure. * sly/game.scm (run-game-loop): Set the frame's alpha value before each render call.
* examples: mines: Add missing tileset.David Thompson2016-01-101-0/+0
|
* render: sprite-batch: Unbind VAO *before* mapping buffers.David Thompson2016-01-021-27/+29
| | | | | | * sly/render/sprite-batch.scm (sprite-batch-flush): Don't worry about VAOs here. (with-sprite-batch): Unbind VAO before mapping vertex buffers.
* render: Add render/signal macro.David Thompson2016-01-022-2/+11
| | | | * sly/render.scm (render/signal): New syntax.
* signal: Add hook API for side-effects.David Thompson2016-01-011-6/+30
| | | | | | | | | * sly/signal.scm (<signal>)[hook]: New field. (signal-hook): New selector. (add-signal-hook, remove-signal-hook, clear-signal-hook!): New procedures. (%make-signal): Create hook for the signal. (signal-propagate!): Run hook.
* Update examples to use sprite batch.David Thompson2016-01-012-100/+90
|
* render: Add sprite batch.David Thompson2016-01-013-0/+262
| | | | | | | Finally, we can have decent sprite rendering performance! * sly/render/sprite-batch.scm: New file. * Makefile.am (SOURCES): Add it.
* render: mesh: Add support for streaming vertex buffers.David Thompson2016-01-011-13/+56
| | | | | | | | | | | * sly/render/mesh.scm (<vertex-buffer>)[length]: New field. (vertex-buffer-length): Now return the length in bytes. (vertex-buffer-element-length, make-streaming-vertex-buffer) (map-vertex-buffer!, unmap-vertex-buffer!): New procedures. (init-vertex-buffer-data!): Delete. (bytevector->vertex-buffer): Move body of 'init-vertex-buffer-data!' within. (make-mesh): Use 'vertex-buffer-element-length'.
* build: Improve Guile version check.David Thompson2016-01-011-1/+3
|
* math: rect: Fix rect-inflate implementation.David Thompson2016-01-011-2/+2
| | | | | * sly/math/rect.scm (%rect-inflate): Subtract, not add, the half width. D'oh!
* Update Guix recipe.David Thompson2015-12-221-2/+8
|
* build: Bump to 0.2.0.David Thompson2015-12-221-1/+1
|
* Upgrade to SDL2!David Thompson2015-12-2222-663/+266
| | | | | | This commit is massive and crazy and I'm not going to do the usual GNU ChangeLog thing because it's just too much. Let's just be happy that the port is completed!
* doc: Fix another typo.David Thompson2015-12-151-2/+2
|
* doc: Fix typo.David Thompson2015-12-151-1/+1
|
* Reimplement live-reload module.David Thompson2015-11-152-26/+67
| | | | | | | * sly/live-reload.scm (watch-files): New procedure. (live-reload): Rename to... (with-live-reload): This. * doc/api/utils.tex ("Live Reloading"): Update docs.
* signal: Add signal-call.David Thompson2015-11-152-1/+13
| | | | | * sly/signal.scm (signal-call): New procedure. * doc/api/signals.texi: Add docs.
* render: shader: Rename <shader-program> to <shader>.David Thompson2015-11-153-146/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * sly/render.scm * sly/render/model.scm (null-model): Use 'null-shader'. * sly/render/shader.scm (<shader-stage>): Rename to <shader>. (<shader-program>): Rename to <shader>. (vertex-shader?, fragment-shader?): Rename to... (vertex-shader-stage?, fragment-shader-stage?): ...these. (shader-stage-guardian): New variable. (%shader-compiled?, shader-compiled?): Rename to... (%shader-stage-compiled?, shader-stage-compiled?): ...these. (display-compilation-error): Change 'shader' to 'stage'. (compile-shader, set-shader-source, make-shader, make-vertex-shader) (make-fragment-shader, load-shader, load-vertex-shader, load-fragment-shader): Rename to... (compile-shader-stage, set-shader-stage-source, make-shader-stage) (make-vertex-shader-stage, make-fragment-shader-stage) (load-shader-stage, load-vertex-shader-stage) (load-fragment-shader-stage): ...these. (shader-program-uniform-location, shader-program-linked?) (make-shader-program, load-shader-program, null-shader-program) (apply-shader-program): Rename to... (shader-uniform-location, shader-linked?, make-shader, load-shader) (null-shader, apply-shader): ...these. (with-shader): Delete. (uniform-set!): Change 'shader-program' argument to 'shader'. (%default-shader): Use 'load-shader'.