summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* guix: Use native-inputs properly and add texinfo.David Thompson2015-04-031-3/+6
| | | | | * package.scm: Move native inputs where they belong. Add texinfo to native inputs.
* window: Throw an exception when SDL window cannot be opened.David Thompson2015-03-171-1/+2
| | | | | * sly/window.scm (open-window): Throw error when 'SDL:set-video-mode' fails.
* Fix package.scm, again.David Thompson2015-03-171-5/+10
|
* Update package.scm.David Thompson2015-03-171-11/+6
|
* render: context: Rewrite transform stack.David Thompson2015-03-122-25/+53
| | | | | | | | | * sly/render/context.scm (with-temp-transform): Delete. (render-context-transform, render-context-transform*!, render-context-transform-identity!, render-context-push-transform!, render-context-pop-transform!, copy-transform!): New procedures. (with-transform-excursion): New syntax. (render-context-reset!): Set top of matrix stack to identity matrix.
* render: context: Use GL parameters.David Thompson2015-03-111-54/+34
| | | | | | | | | | | | * sly/render/context.scm (%set-render-context-blend-mode!, %set-render-context-depth-test!?, %set-render-context-texture!, %set-render-context-shader!, %set-render-context-mesh!): Delete. (make-render-context): Create GL parameters. (render-context-reset!): Reset GL parameters. (define-context-setter): New syntax. (set-render-context-blend-mode!, set-render-context-depth-test!?, set-render-context-texture!, set-render-context-shader!, set-render-context-mesh!): Define in terms of 'define-context-setter'.
* render: shader: Add null-shader-program.David Thompson2015-03-111-1/+3
| | | | * sly/render/shader.scm (null-shader-program): New variable.
* render: texture: Ensure 2D textures are enabled when applying texture.David Thompson2015-03-111-1/+3
| | | | | * sly/render/texture.scm (apply-texture): Enable 2D textures before binding texture.
* render: utils: Add apply-depth-test.David Thompson2015-03-111-1/+7
| | | | * sly/render/utils (apply-depth-test): New procedure.
* render: utils: Improve apply-blend-mode.David Thompson2015-03-111-3/+8
| | | | | * sly/render/utils.scm (apply-blend-mode): Enable/disable blending when necessary.
* render: context: Add GL parameter type.David Thompson2015-03-111-0/+18
| | | | | | | | | | * sly/render/context.scm (<gl-parameter>): New record type. (%make-gl-parameter, make-gl-parameter, gl-parameter?, gl-parameter-default, gl-parameter-bind, gl-parameter-ref, %gl-parameter-set!, gl-parameter-set!, gl-parameter-reset!): New procedures. Fixup gl-parameter
* render: utils: Remove generic draw method.David Thompson2015-03-111-5/+1
| | | | * sly/render/utils.scm (draw): Delete.
* examples: Clean up minesweeper demo.David Thompson2015-03-101-27/+46
| | | | * examples/mines/mines.scm: Miscellaneous clean up.
* render: Remove shader argument from sprite and label constructors.David Thompson2015-03-092-15/+7
| | | | | * sly/render/font.scm (make-label): Remove 'shader' keyword argument. * sly/render/sprite.scm (make-sprite): Likewise.
* render: Merge <group> into <model>.David Thompson2015-03-0911-252/+171
| | | | | | | | | | | | | | | | | | | | * sly/render/model.scm (<model>): Add 'transform' and 'children' fields. (model-transform, model-children): New accessors. (make-model): Add 'transform' and 'children' keyword arguments. (set-transform-identity!): New procedure. (draw-model): Recursively draw model and all children. (model-paint, model-blend): Renamed. (paint, blend, group, group*, move, place): New procedures. * sly/render/group.scm: Delete. * Makefile.am (SOURCES): Remove it. * examples/2048/2048.scm: Update example. * examples/animation.scm: Likewise. * examples/font.scm: Likewise. * examples/joystick.scm: Likewise. * examples/mines/mines.scm: Likewise. * examples/simple.scm: Likewise. * examples/tilemap.scm: Likewise. * README.org (Example): Update sample code.
* signals: Add signal-timer.David Thompson2015-03-092-1/+11
| | | | | * sly/signal.scm (signal-timer): New procedure. * doc/api/signals.texi: Document it.
* render: mesh: Add null-mesh.David Thompson2015-03-082-1/+3
| | | | | * sly/render/mesh.scm (null-mesh): New variable. * sly/render/context.scm (render-context-reset!): Reset to null-mesh.
* render: texture: Add null-texture.David Thompson2015-03-082-1/+4
| | | | | * sly/render/texture.scm (null-texture): New variable. * sly/render/context.scm (render-context-reset!): Reset to null-texture.
* render: mesh: Rewrite constructors and expose vertex buffers.David Thompson2015-01-264-116/+143
| | | | | | | | | | | | | | | | | * sly/rener/mesh.scm (vertex-buffer-attribute-size): Reimplement. (type-size): New procedure. (with-vertex-buffer): Unbind buffer when done. (init-vertex-buffer-data!): New procedure. (make-vertex-buffer*): Remove. (bytevector->vertex-buffer, vector->vertex-buffer): New procedures. (make-vertex-buffer): Implement in terms of 'bytevector->vertex-buffer'. (make-mesh): Change to accept pre-built vertex buffers. (build-mesh, mesh-ref): New procedures. (mesh-guadian): Destructure vertex buffer alist. * sly/render/shape.scm (make-cube): Use 'build-mesh'. * sly/render/sprite.scm (make-sprite): Likewise. * sly/render/tile-map.scm (compile-tile-layer): Likewise.
* render: mesh: Generalize <mesh> type to support streaming data.David Thompson2015-01-261-41/+74
| | | | | | | | | | | | | | | | * sly/render/mesh.scm (<mesh) [attr-size, length]: Remove fields. [usage]: Add field. (vertex-buffer-attr-size): Delete. (vertex-buffer-attribute-size): New procedure. (vertex-attrib-pointer): Use it. (vertex-buffer-length): Reimplement. (vertex-buffer-target, vertex-buffer-usage-gl, index-buffer?, attribute-type): New procedures. (bind-vertex-buffer): Use it. (with-vertex-buffer): Don't unbind buffer (one less context change). (make-vertex-buffer*): New procedure. (make-vertex-buffer): Use it. (make-mesh): Add index buffer to mesh VBO list.
* render: mesh: Support streaming vertex buffers.David Thompson2015-01-261-3/+6
| | | | * sly/render/mesh.scm (make-vertex-buffer): Add 'stream?' argument.
* render: mesh: Add data field.David Thompson2015-01-261-7/+9
| | | | * sly/render/mesh.scm (<mesh>) [data]: New field.
* render: context: Reset state after rendering.David Thompson2015-01-261-1/+3
| | | | | | | | Fixes state pollution issues where GL objects remained bound after rendering. * sly/render/context.scm (with-render-context): Call 'render-context-reset!' after evaluating the body.
* render: tileset: Add tileset-invert-index.David Thompson2015-01-241-1/+11
| | | | * sly/render/tileset.scm (tileset-invert-index): New procedure.
* render: tileset: Add rows and columns fields.David Thompson2015-01-241-14/+20
| | | | | | | * sly/render/tileset.scm (<tileset>) [rows, columns]: New fields. (tileset-rows, tileset-columns): New procedures. (split-texture): Return rows and columns. (make-tileset, load-tileset): Use new constructor.
* wrappers: gsl: Add cblas-sgemv wrapper.David Thompson2015-01-211-1/+6
|
* examples: Update tile map example to use more efficient rendering.David Thompson2015-01-191-40/+45
| | | | * examples/tilemap.scm: Update it.
* render: Add tile-map module.David Thompson2015-01-192-0/+130
| | | | | * sly/render/tile-map.scm: New file. * Makefile.am (SOURCES): Add it.
* render: texture: Export texture-parent.David Thompson2015-01-191-0/+1
| | | | * sly/render/texture.scm (texture-parent): Export it.
* utils: Add vlist-ref* and list->vlist*.David Thompson2015-01-192-2/+30
| | | | | * sly/utils.scm (vlist-ref*, list->vlist*): New procedures. * doc/api/utils.texi: Document them.
* render: tileset: Fix compilation warning.David Thompson2015-01-191-0/+1
| | | | * sly/render/tileset.scm: Import (ice-9 format).
* render: tileset: Use custom record type printer.David Thompson2015-01-191-0/+11
| | | | | | | * sly/render/tileset.scm: Use a much more brief, readable record type printer that does not print out all of the tiles, and thus repeating the parent texture n times, which is problematic for large values of n.
* render: tileset: Add texture field.David Thompson2015-01-191-8/+7
| | | | | | * sly/render/tileset.scm (tileset-texture): New procedure. (%make-tileset): New 'texture' argument. (make-tileset, load-tileset): Use new constructor.
* TODO: Add new item.David Thompson2015-01-191-0/+6
| | | | * TODO.org ("Bitmap font rendering from tileset"): New item.
* Update TODO list.David Thompson2015-01-191-3/+13
| | | | * TODO.org: Mark one sub-item as done. Add some new items.
* doc: Document window and game loop modules.David Thompson2015-01-191-0/+107
| | | | * doc/api/init.texi: Add docs!
* window: Fix outdated docstring.David Thompson2015-01-191-1/+1
| | | | * sly/window.scm (close-window): Remove mention of audio in docstring.
* doc: input: Relabel signals as "Scheme Signals".David Thompson2015-01-191-9/+9
| | | | * doc/api/input.texi: s/Signal/Scheme Signal/
* live-reload: Remove global variable.David Thompson2015-01-181-19/+19
| | | | | * sly/live-reload.scm (live-reload-interval): Delete. (live-reload): Add 'polling-interval' argument.
* utils: Remove unused procedures.David Thompson2015-01-181-12/+1
| | | | * sly/utils.scm (any-equal?, logand?): Delete.
* doc: Document utility modules.David Thompson2015-01-181-0/+81
| | | | * doc/api/utils.texi: Document the REPL, live-reload, and utils modules.
* render: tileset: Fix split-texture again.David Thompson2015-01-181-2/+2
| | | | | * sly/render/tileset.scm (split-texture): Swap rows and columns calculation.
* render: tileset: Fix column calculation.David Thompson2015-01-181-1/+1
| | | | | * sly/render/tileset.scm (split-texture): Use texture height in columns calculation, not width.
* doc: Add example input module import snippets.David Thompson2015-01-181-0/+12
| | | | * doc/api/input.texi: Add import snippets.
* doc: Document input modules.David Thompson2015-01-181-0/+171
| | | | | * doc/api/input.texi: Add docs for keyboard, mouse, and joystick input modules.
* framebuffer: Fix syntax problem in 'with-framebuffer'.David Thompson2015-01-121-2/+2
| | | | | * sly/render/framebuffer.scm (with-framebuffer): Bind framebuffer to a syntactic variable that doesn't clash with the 'version-3-0' macro.
* mines: Disable clicking on tiles when you lose.Christopher Allan Webber2015-01-102-1/+3
| | | | | | | | Also add myself to AUTHORS! ;) * AUTHORS: Add me. * examples/mines/mines.scm (board-reveal): Don't reveal tiles in 'game over' state.
* Fix config.scm generation.David Thompson2014-12-261-1/+0
| | | | * configure.ac: Do not generate sly/config.scm. Let the Makefile do it.
* math: rect: Update docstrings.David Thompson2014-12-131-8/+7
| | | | | * sly/math/rect.scm (rect-position, rect-inflate, rect-union, rect-clip, rect-contains?): Update docstrings.
* math: transform: Update docstrings.David Thompson2014-12-131-4/+4
| | | | * sly/math/transform (transform+, transform*): Update docstrings.