| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
* sly/render/sprite-batch.scm (sprite-batch-flush): Don't worry about
VAOs here.
(with-sprite-batch): Unbind VAO before mapping vertex buffers.
|
|
|
|
| |
* sly/render.scm (render/signal): New syntax.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
| |
Finally, we can have decent sprite rendering performance!
* sly/render/sprite-batch.scm: New file.
* Makefile.am (SOURCES): Add it.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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'.
|
| |
|
|
|
|
|
| |
* sly/math/rect.scm (%rect-inflate): Subtract, not add, the half width.
D'oh!
|
| |
|
| |
|
|
|
|
|
|
| |
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!
|
| |
|
| |
|
|
|
|
|
|
|
| |
* sly/live-reload.scm (watch-files): New procedure.
(live-reload): Rename to...
(with-live-reload): This.
* doc/api/utils.tex ("Live Reloading"): Update docs.
|
|
|
|
|
| |
* sly/signal.scm (signal-call): New procedure.
* doc/api/signals.texi: Add docs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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'.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
* sly/config.scm.in (scope-datadir): New procedure.
|
| |
|
| |
|
| |
|
|
|
|
| |
* Makefile.am (godir): Set to the same as moddir.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.scm: Add source code information and necessary build options.
* INSTALL.org: Add Guix installation instructions.
* README: Add configure flags for Guix dev environments.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
* sly/render.scm (rotate-x, rotate-y, rotate): New procedures.
|
| |
|
| |
|
|
|
|
|
|
| |
Forgot to update this one to the new rendering API.
* sly/render/shape.scm (make-cube): Use render combinators.
|
|
|
|
| |
* sly/render/camera.scm (3d-camera): New procedure.
|
|
|
|
|
| |
* examples/framebuffer.scm: New file.
* examples/Makefile.am (nobase_dist_examples_DATA): Add it.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
* sly/record.scm: New file.
* Makefile.am (SOURCES): Add it.
|
|
|
|
|
| |
* sly/render/mesh.scm (with-mesh): Apply the null-mesh after evaluating
the body.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
* sly/render.scm (graphics-reset!): Force context changes.
|