summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* render: shader: Remove 'attributes' field.David Thompson2015-11-141-32/+26
| | | | | | | | | | | | Attributes are fixed so the field is useless. * sly/render/shader.scm (shader-program-attribute-location): Delete. (<shader-program>): Delete 'attributes' field. (make-shader-program): Remove 'attributes' argument. (load-shader-program): Likewise. Change arguments from positional to keyword. (%default-shader): New variable. (load-default-shader): Reimplement in terms of promises.
* config: Add scope-datdir procedure.David Thompson2015-11-141-0/+5
| | | | * sly/config.scm.in (scope-datadir): New procedure.
* TODO: Mark 0.1 release as DONE!David Thompson2015-11-131-1/+1
|
* guix: Update development snapshot.v0.1David Thompson2015-11-121-2/+2
|
* examples: Install crate.png image.David Thompson2015-11-121-0/+1
|
* build: Fix where compiled Guile modules get installed.David Thompson2015-11-121-1/+1
| | | | * Makefile.am (godir): Set to the same as moddir.
* config: Fix configure script substitution.David Thompson2015-11-122-3/+2
|
* TODO: Add new item.David Thompson2015-11-121-0/+6
|
* config: Fix data directory.David Thompson2015-11-125-11/+16
| | | | | | | | | | | | | | | | | | This was all messed up: - 'pkgdatadir' wasn't something that could be substituted via autoconf - I was still using "GUILE_2D" in the data dir env var name Now it's all better and Sly data should be able to be found from the pre-installation environment *and* the installation prefix. * configure.ac (sly_prefix, sly_datadir): New variables. * pre-inst-env.in: Set SLY_DATADIR. * sly/config.scm.in (%pkgdatadir): Delete. (%datadir): New variable. Use SLY_DATADIR env var or the configured datadir. * sly/render/font.scm (load-default-font): Use %datadir. * sly/render/shader.scm (load-default-shader): Likewise.
* game: Stop the game loop upon SIGINT.David Thompson2015-11-121-0/+5
| | | | | | | Fixes a long standing annoyance that pressing C-c wouldn't kill the application. * sly/game.scm (run-game-loop): Catch SIGINT and call 'stop-game-loop'.
* guix: Update copyright year.David Thompson2015-11-121-1/+1
|
* guix: Add a complete package for development snapshots.David Thompson2015-11-123-29/+69
| | | | | | * guix.scm: Add source code information and necessary build options. * INSTALL.org: Add Guix installation instructions. * README: Add configure flags for Guix dev environments.
* Update TODO list.David Thompson2015-11-121-10/+5
|
* configure: Add FreeImage and GSL prefix/libdir options.David Thompson2015-11-114-5/+61
|
* Rename autogen.sh to bootstrap.David Thompson2015-11-111-0/+0
|
* Update README.David Thompson2015-11-091-16/+11
|
* Rename package.scm to guix.scm.David Thompson2015-11-091-1/+1
|
* Update documentation a bit.David Thompson2015-11-096-61/+88
|
* Add new indentation rule to .dir-locals.el.David Thompson2015-11-091-0/+1
|
* examples: Add shape example.David Thompson2015-11-095-1/+86
| | | | | | | | * examples/shapes.scm: New file. * examples/images/country-sky.png: New file. * examples/images/country-trees.png: New file. * examples/Makefile.am (nobase_dist_examples_DATA): Add them. * examples/images/AUTHORS: Credit ansimuz.
* render: Add more rotation combinators.David Thompson2015-11-091-0/+18
| | | | * sly/render.scm (rotate-x, rotate-y, rotate): New procedures.
* render: Export additional procedures.David Thompson2015-11-091-1/+8
|
* render: mesh: Clean up style a bit.David Thompson2015-11-091-15/+33
|
* render: shape: Fix make-cube.David Thompson2015-11-091-5/+7
| | | | | | Forgot to update this one to the new rendering API. * sly/render/shape.scm (make-cube): Use render combinators.
* render: camera: Add 3d-camera procedure.David Thompson2015-11-091-1/+12
| | | | * sly/render/camera.scm (3d-camera): New procedure.
* examples: Add framebuffer example.David Thompson2015-09-212-0/+65
| | | | | * examples/framebuffer.scm: New file. * examples/Makefile.am (nobase_dist_examples_DATA): Add it.
* render: Reimplement rendering engine using functional combinators.David Thompson2015-09-2120-427/+797
| | | | | | | | | | | Warning: This is a huge commit. I completely gutted the old scene graph and replaced it with a somewhat monadic rendering combinator module instead. The interface remains purely functional, but replaces the <model> data type with procedures in the rendering monad instead. This opens the door for rendering *anything*, not just meshes. Now I can implement particle systems and other non-static things.
* Add new record type syntax.David Thompson2015-09-212-0/+55
| | | | | * sly/record.scm: New file. * Makefile.am (SOURCES): Add it.
* render: mesh: Tweak with-mesh to use null-mesh.David Thompson2015-09-091-1/+1
| | | | | * sly/render/mesh.scm (with-mesh): Apply the null-mesh after evaluating the body.
* render: mesh: Add custom record type printer.David Thompson2015-09-091-0/+9
| | | | | | | | This avoids an issue where debugging output would be clogged by dumping *all* of the vertex information for large meshes. * sly/render/mesh.scm (<mesh>): Add record type printer that doesn't print out the vertices.
* render: Add separate projection and model-view matrix stacks.David Thompson2015-09-093-35/+49
| | | | | | | | | | | | | | | Just like the Opengl 2.x days! ;) * sly/render.scm (graphics-transform, graphics-transform-mul!, graphics-transform-identity!): Delete. (graphics-model-view-transform, graphics-model-view-mul!, graphics-model-view-identity!, graphics-projection-transform, graphics-projection-mul!, graphics-projection-identity!): New procedures. (with-model-view-excursion, with-projection-excursion): New syntax. (call-with-transform-excursion): Move matrix copying out of the "in guard." (draw-scene): Use new matrix stacks.
* render: Force OpenGL state changes when resetting context.David Thompson2015-09-091-7/+7
| | | | * sly/render.scm (graphics-reset!): Force context changes.
* render: Reset OpenGL state after drawing a frame.David Thompson2015-09-091-1/+4
| | | | | | | | Not resetting the graphics context after rendering leads to strange bugs such as sprites disappearing when a new mesh is created in between drawing. * sly/render.scm (with-graphics): Reset context after drawing.
* render: Reimplement OpenGL state machine manager.David Thompson2015-08-267-238/+243
| | | | | | | | | | | | | The implementation is a bit cleaner, and it's a stepping stone towards render combinators. * sly/render/context.scm: Delete. * sly/render.scm: New file. * Makefile.am (SOURCES): Add it. Remove context.scm. * sly/game.scm (run-game-loop): Use new <graphics> type. * sly/render/model.scm (draw-model): Likewise. * sly/render/scene.scm (draw-scene): Likewise. * examples/2048/2048.scm: Remove (sly render context) import.
* Optimize matrix operations.David Thompson2015-08-253-43/+57
| | | | | | | | | | | | | | | | | | | | | Guile's array procedures are slow, so switch to using raw bytevectors instead. Additionally, converting the bytevector to a pointer is also slow, so the pointer is now cached for redundant calls. There's more to be done, but this was low hanging fruit. * sly/math/transform.scm (<transform>)[ptr]: New field. (transform-ptr): New accessor. (set-transform-ptr!): New setter. (make-4x4-matrix): Implement using bytevectors. (matrix-set!, matrix-ref): New procedures. (make-transform, transform-vector2, transform-position): Use 'matrix-set!' and 'matrix-ref'. (transpose, transform+, transform*): Use new transform constructor. (transform->pointer): Cache pointer. * sly/render/context.scm (copy-transform!): Use 'bytevector-copy!' * sly/render/shader.scm: Use 'transform->pointer' in the transform uniform setter.
* Update INSTALL.orgJochem Raat2015-08-051-2/+12
| | | | | | Add the Gnu Scientific Library (GSL) to the dependencies and update the git clone command for sly itself to the new address of the repository (https://git.dthompson.us/sly.git), since gitorious is down.
* Fix Guix development environment.David Thompson2015-08-051-1/+1
| | | | * package.scm: Change source to #f for now.
* examples: Add Conway's Game of Life.Christopher Allan Webber2015-06-152-0/+338
| | | | | * examples/life.scm: New file. * examples/Makefile.am (nobase_dist_examples_DATA): Add it.
* Add composite (sly) module.David Thompson2015-06-146-41/+72
| | | | | | | | | * sly.scm: New file. * Makefile.am (SOURCES): Add it. * sandbox.in: Use new module. * examples/common.scm: Likewise. * examples/font.scm: Likewise. * README ("Example"): Update example.
* signal: Add comments specifying emacs indentation for macros.Christopher Allan Webber2015-06-121-0/+4
| | | | | * sly/signal.scm: Add comments specifying emacs indentation level for signal-let and signal-let* syntax.
* Update README.David Thompson2015-06-101-6/+16
|
* Update sandbox script.David Thompson2015-06-101-10/+9
|
* Rename start-game-loop to run-game-loop.David Thompson2015-06-1010-11/+11
| | | | | | | | | | | | | * doc/api/init.texi: s/start-game-loop/run-game-loop/ * examples/2048/2048.scm: Likewise. * 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. * sandbox.in: Likewise. * sly/game.scm: Likewise.
* Clean up build system.David Thompson2015-06-105-24/+11
|
* Fix simple example.David Thompson2015-06-061-24/+3
|
* Update examples to use new interfaces.David Thompson2015-06-067-103/+125
|
* signal: Redefine the semantics of signal-let and signal-let*.David Thompson2015-06-061-9/+9
| | | | * sly/signal.scm (signal-let, signal-let*): Reimplement.
* game: Add scene argument to start-game-loop.David Thompson2015-06-061-5/+12
| | | | * sly/game.scm (start-game-loop): Add 'scene' argument.
* render: model: Add model-scale.David Thompson2015-06-061-0/+6
| | | | * sly/render/model.scm (model-scale): New procedure.
* render: Add <scene> record type.David Thompson2015-06-064-50/+135
| | | | | | | | | | | * sly/render/scene.scm: New file. * Makefile.am (SOURCES): Add it. * sly/render/camera.scm (apply-viewport): Do not clear viewport. (clear-viewport): New procedure. * sly/render/model.scm (model-sub-scene): New accessor. (make-model): Add #:sub-scene keyword argument. (draw-sub-scene): New variable. (draw-model): Remove rendering initialization code. Render sub-scenes.