summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Move texture anchor procedure.David Thompson2014-02-162-15/+16
| | | | | * 2d/sprite.scm (make-anchor): Delete it. * 2d/texture.scm (anchor-texture): New procedure.
* Formatting cleanup.David Thompson2014-02-161-15/+15
| | | | * 2d/sprite.scm: Reindent file.
* Change sprite-vertex to texture-vertex.David Thompson2014-02-162-47/+49
| | | | | | | | | | * 2d/sprite.scm (sprite-vertex, sprite-vertex-size, x-offset, s-offset, pack-sprite-vertices, draw-sprite-vertices): Delete. (update-sprite-vertices!): Use 'pack-texture-vertices'. (make-sprite): Use 'texture-vertex'. (draw-sprite): Use 'draw-texture-vertices'. * 2d/texture.scm (texture-vertex, texture-vertex-size, x-offset, s-offset, pack-texture-vertices, draw-texture-vertices): New variables.
* Delete draw-texture.David Thompson2014-02-161-24/+0
| | | | * 2d/texture.scm (draw-texture): Delete it.
* Remove sprite batch from particles example.David Thompson2014-02-161-8/+6
| | | | | | | This slows down the demo considerably, but sprite batches need to be rewritten in order to be actually performant and of real value. * examples/particle.scm (batch): Delete it.
* Use GLSL shaders for sprites.David Thompson2014-02-164-278/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2d/sprite.scm: (sprite-vertex): Remove color vertex. (r-offset): Delete it. (pack-sprite-vertices): Remove logic moved to shader. (draw-sprite-vertices): Remove color vertex array rendering. (sprite-shader): New variable. (<sprite>): Remove dirty field and adjust setters. (make-anchor): New procedure. (update-sprite-vertices!): Use new 'pack-sprite-vertices'. (make-sprite): Use 'make-anchor' and 'update-sprite-vertices!'. (dirty-sprite-setter): Delete it. (load-sprite): Formatting. (sprite-animation-texture): Delete it. (drawable-texture): New procedure. (sprite-texture): Extract body to 'drawable-texture'. (sprite-anchor-vector): Delete it. (set-sprite-anchor!): Reimplemented. (update-sprite-animator!): Update vertices. (draw-sprite): Use shader program. (<sprite-batch>, make-sprite-batch, sprite-batch?, sprite-batch-max-size, sprite-batch-size, set-sprite-batch-size!, sprite-batch-texture, set-sprite-batch-texture!, sprite-batch-vertices, sprite-batch-draw, with-sprite-batch): Delete all sprite batch code. * data/Makefile.am (shadersdir, shaders_DATA): New variables. * data/shaders/sprite-fragment.glsl: New shader. * data/shaders/sprite-vertex.glsl: New shader.
* Throw error if shader file does not exist.David Thompson2014-02-161-1/+3
| | | | * 2d/shader.scm (load-shader): Add exception handling.
* Use vec2 instead of vec4 for vector2 uniforms.David Thompson2014-02-161-4/+1
| | | | | * 2d/shader.scm: Use vec2 instead of vec4 when setting a vector2 uniform value.
* Remove calls that change OpenGL matrix mode.David Thompson2014-02-161-6/+1
| | | | * 2d/game.scm (draw): Remove matrix mode calls.
* Print FPS to stdout in examples.David Thompson2014-02-151-1/+9
| | | | * examples/common.scm: Use (2d fps) module.
* Don't load default font upon module import.David Thompson2014-02-151-3/+3
| | | | | * 2d/font.scm (default-font): Delete variable. (load-default-font): New procedure.
* Fix schedule-interval.David Thompson2014-02-151-1/+2
| | | | * 2d/agenda.scm (schedule-interval): Actually use the 'delay' parameter.
* Add window-projection signal.David Thompson2014-02-151-0/+8
| | | | * 2d/window.scm (window-projection): New variable.
* Add 4x4 transformation matrix module.David Thompson2014-02-153-0/+179
| | | | | | * 2d/transform.scm: New module. * 2d/shader.scm: Add uniform setter for transforms. * Makefile.am (SOURCES): Add '2d/transform.scm'.
* Remove AUTOMAKE_OPTIONS from examples/Makefile.am.David Thompson2014-02-111-2/+0
| | | | * examples/Makefile.am (AUTOMAKE_OPTIONS): Remove it.
* Add a convenient default font.David Thompson2014-02-116-2/+12
| | | | | | | | | * data/fonts/DejaVuSans.ttf: New file. * data/fonts/AUTHORS: New file. * data/Makefile.am: New file. * configure.ac (AC_CONFIG_FILES): Add 'data/Makefile'. * Makefile.am (SUBDIRS): Add 'data'. * 2d/font.scm (default-font): New variable.
* Add build-time configuration module.David Thompson2014-02-103-0/+32
| | | | | | | * 2d/config.scm.in: New file. * Makefile.am (2d/config.scm): New rule. (SOURCES): Add 2d/config.scm. * .gitignore: Ignore 2d/config.scm.
* Add examples Makefile.David Thompson2014-02-093-2/+31
| | | | | | * Makefile.am (SUBDIRS): Add 'examples'. * configure.ac (AC_CONFIG_FILES): Add 'examples/Makefile'. * examples/Makefile.am: New file.
* Add shader module.David Thompson2014-02-095-0/+322
| | | | | | | | * 2d/shader.scm: New module. * Makefile.am: Add 2d/shader.scm to SOURCES. * examples/shader.scm: New example. * examples/shaders/fragment-shader.glsl: New shader. * examples/shaders/vertex-shader.glsl: New shader.
* Remove silly circular import.David Thompson2014-02-091-1/+0
| | | | * 2d/game.scm: Don't import (2d game), silly.
* Add define-guardian macro.David Thompson2014-02-092-17/+30
| | | | | | * 2d/helpers.scm (define-guardian): New macro. * 2d/texture.scm (reap-textures): Delete it. (texture-guardian): Defined using define-guardian.
* Add new coroutine macro.David Thompson2014-02-063-35/+54
| | | | | | | | * 2d/coroutine.scm (call-with-coroutine): New name for coroutine. (coroutine): New macro. (colambda, codefine, codefine*): Use call-with-coroutine. * examples/coroutine.scm: Use coroutine macro. * README.org: Update coroutine and agenda examples.
* Remove dynamic scoping of agendas.David Thompson2014-02-067-91/+62
| | | | | | | | | | | | | | | | * 2d/agenda.scm: (*global-agenda*, current-agenda, with-agenda): Delete. (agenda?, agenda-time): Export. (schedule-every, schedule-each): Rename schedule-every to schedule-each. (schedule-next): Delete. * 2d/game.scm: (game-agenda): New variable. (update): Tick game-agenda. * 2d/repl.scm: Use new agenda API. * 2d/sprite.scm: Use new agenda API. * 2d/time.scm: (time-every, time-each, time-delay): Change signature and use new agenda API. * examples/coroutine.scm: Use new agenda API. * examples/particles.scm: Use new agenda API.
* Check off TODO item.David Thompson2014-01-261-1/+1
| | | | * TODO.org: Check list item.
* Close example programs when window is closed.David Thompson2014-01-261-0/+4
| | | | * examples/common.scm: Add window close hook.
* Add window-close-hook.David Thompson2014-01-261-1/+9
| | | | * 2d/window.scm: New hook.
* Remove unused import declarations.David Thompson2014-01-261-2/+0
| | | | * 2d/game.scm: Remove (2d coroutine) and (2d vector2) imports.
* Move OpenGL viewport settings to game module.David Thompson2014-01-262-7/+9
| | | | | | * 2d/window.scm (open-window): Remove viewport config. * 2d/game.scm (draw): Add viewport config.
* Move SDL event handling to a separate module.David Thompson2014-01-265-28/+51
| | | | | | | | | | | | * 2d/event.scm: New module. * 2d/game.scm: Remove event handling code. * 2d/keyboard.scm: Import (2d event) instead of (2d game). * 2d/mouse.scm: Import (2d event) instead of (2d game). * 2d/window.scm: Import (2d event) instead of (2d game).
* Add window-resize-hook.David Thompson2014-01-261-1/+6
| | | | * 2d/window.scm (window-resize-hook): New hook.
* Don't export font-ftgl-font procedure.David Thompson2014-01-261-1/+0
| | | | * 2d/font.scm: Remove font-ftgl-font from export list.
* Ignore more stuff in the doc/ directory.David Thompson2014-01-261-0/+2
| | | | * .gitignore: Ignore html docs.
* List all source files explicitly.David Thompson2014-01-241-1/+34
| | | | | * Makefile.am (REPL_SOURCES, WRAPPER_SOURCES): New variables. (SOURCES): Remove wildcard and list modules explicitly.
* Update TODO list.David Thompson2014-01-231-28/+13
|
* Return unspecified value for void audio functions.David Thompson2014-01-231-31/+55
| | | | | | | * 2d/audio.scm (ignore-value): New macro. (set-sample-volume, play-sample, pause-music, resume-music) (rewind-music, stop-music): Ignore return value. (music-playing?, music-paused?): Add docstrings.
* Clean up audio API a bit.David Thompson2014-01-221-31/+31
| | | | * 2d/audio.scm: Clean up procedures.
* Initialize audio in audio module instead of window module.David Thompson2014-01-222-2/+2
| | | | | | | * 2d/window.scm (open-window, close-window): Remove open/close audio calls. * 2d/audio.scm: Open audio when module is imported.
* Remove obsolete examples.David Thompson2014-01-204-233/+0
|
* Update example image authors file.David Thompson2014-01-202-3/+5
|
* Tweak README a bit more.David Thompson2014-01-131-2/+7
| | | | * 2d/README.org: More changes!
* Bring README up-to-date.David Thompson2014-01-131-119/+61
| | | | * README.org: Update examples and remove obsolete stuff.
* Remove commented code.David Thompson2014-01-131-4/+0
| | | | * 2d/texture.scm: Remove commented code.
* Fix docstring.David Thompson2014-01-131-2/+2
| | | | * 2d/repl/repl.scm (add-to-repl-mvar): Fix.
* Run REPL metacommands in the main thread, too.David Thompson2014-01-131-1/+7
| | | | * 2d/repl/repl.scm: Fix bug.
* Fix coroutine example to actually use coroutines.David Thompson2014-01-131-7/+11
|
* Clean up module definition.David Thompson2014-01-121-3/+1
| | | | * 2d/wrappers/gl.scm: Remove unused cruft.
* Replace obsolete procedure call with the correct one.David Thompson2014-01-121-4/+8
| | | | * 2d/texture.scm (draw-texture): Use color module.
* Clean up custom REPL code.David Thompson2014-01-121-15/+12
| | | | * 2d/repl/repl.scm (add-to-repl-mvar, run-repl): Cleanup.
* Remove unused export.David Thompson2014-01-121-2/+1
| | | | * 2d/helpers.scm (rgba->gl-color): Remove export.
* Update particle example.David Thompson2014-01-121-38/+25
| | | | * examples/particles.scm: Update example.