| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
* sly/render/renderer.scm (transform-render-op): New procedure.
* sly/scene.scm (scene->renderer): Don't pass transform to draw method.
Instead, transform the resulting render op afterwards.
* sly/mesh.scm (draw): Remove 'transform' parameter.
|
|
|
|
|
|
|
|
|
|
|
| |
* sly/render/renderer.scm (renderer-cameras): Delete.
(apply-render-op): Remove 'view' parameter.
(make-renderer): Remove 'cameras' parameter.
(render): Remove camera logic.
* sly/scene.scm (scene->render-list): Renamed.
(scene->renderer): New procedure. Return a renderer instead of a list
of render ops.
(draw-scene): New procedure.
|
|
|
|
| |
* sly/render/camera.scm (clear-buffer-mask): Memoize.
|
|
|
|
| |
* sly/render/camera.scm (%standard-clear-flags): New variable.
|
|
|
|
| |
* sly/render/renderer.scm (render): Apply camera viewports.
|
|
|
|
|
| |
* sly/font.scm (flip-pixels-vertically): New procedure.
(render-text): Flip surface vertically before creating a texture.
|
|
|
|
| |
* sly/texture.scm (load-bitmap): Do not flip y-axis.
|
|
|
|
|
| |
* sly/game.scm: Remove (sly camera) import.
* sly/scene.scm: Likewise.
|
|
|
|
|
| |
* sly/render/framebuffer.scm: New file.
* Makefile.am (SOURCES): Add it.
|
|
|
|
|
|
|
| |
* sly/wrappers/gl.scm (glGenFramebuffers, glDeleteFramebuffers,
glBindFramebuffer, glFramebufferTexture2D, glCheckFramebufferStatus,
glGenRenderbuffers, glDeleteRenderbuffers, glBindRenderbuffer,
glRenderbufferStorage, glFramebufferRenderbuffer): New procedures.
|
|
|
|
|
|
|
| |
* Makefile.am (SOURCES): Update camera module file name.
* sly/camera.scm: Delete.
* sly/render/renderer.scm: Import new camera module.
* sly/render/camera.scm: New file.
|
|
|
|
|
|
| |
* sly/render/renderer.scm (render-op-blend-mode): New syntax.
(make-render-op): Add 'blend-mode' parameter.
(apply-render-op): Set blending mode.
|
|
|
|
|
|
|
|
|
| |
* sly/render/utils.scm (<blend-mode>): New record type.
(make-blend-mode, blend-mode?, blend-mode-source,
blend-mode-destination): New syntax.
(default-blend-mode): New variable.
(source-blend-function, destination-blend-function, apply-blend-mode):
New procedures.
|
|
|
|
| |
* sly/transform.scm (transform-position): New procedure.
|
|
|
|
|
| |
* sly/mesh.scm: Remove 'mesh-length' and 'mesh->render-op' from export
list.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* sly/mesh.scm (<vertex-buffer>, %make-vertex-buffer, vertex-buffer?,
vertex-buffer-id, vertex-buffer-type, vertex-buffer-attr-size,
vertex-buffer-length, generate-vertex-buffer, bind-vertex-buffer,
with-vertex-buffer, vertices-bytevector, attribute-size,
gl-buffer-type, make-vertex-buffer, generate-vertex-array,
with-vertex-array, vertex-attrib-pointer): Remove old vertex
buffer/array procedures.
(mesh-length, draw-mesh): Delete.
(mesh-shader): New procedure.
(make-mesh): Reimplement.
(draw): New method.
* sly/shape.scm (make-cube): Decouple from scene node. Use new mesh
constructor.
* sly/sprite.scm (make-sprite): Likewise.
|
|
|
|
|
|
|
|
| |
* sly/scene.scm (make-scene, scene-node-texture, update-scene-node,
draw-scene-node, <scene>, scene?, scene-root, scene-cameras,
update-scene, draw-scene, with-texture-maybe): Delete.
(scene-node, scene-node-object, scene-node-visible?, flatten,
scene->render-list): New procedures.
|
|
|
|
|
| |
* sly/render/utils.scm: New file.
* Makefile.am (SOURCES): Add it.
|
|
|
|
|
| |
* sly/render/renderer.scm: New file.
* Makefile.am (SOURCES): Add it.
|
|
|
|
| |
* TODO.org: Add new items.
|
|
|
|
|
| |
* sly/game.scm (start-game-loop): Just run the draw hook instead of
rendering a scene graph.
|
|
|
|
|
| |
* sly/render/vertex-array.scm: New file.
* Makefile.am (SOURCES): Add it.
|
|
|
|
|
|
| |
* sly/shader.scm (vertex-position-location, vertex-texture-location):
New variables.
(make-shader-program): Bind attribute locations.
|
|
|
|
| |
* sly/helpers.scm (trampoline): New procedure.
|
|
|
|
| |
* sly/transform.scm (build-transform): New procedure.
|
|
|
|
|
| |
* sly/quaternion.scm (rotate): Remove.
* sly/transform.scm (rotate): New procedure.
|
|
|
|
| |
* sly/quaternion.scm: Export '<quaternion>'.
|
|
|
|
|
|
|
| |
* sly/quaternion.scm (%make-quaternion, quaternion): New procedures.
(axis-angle->quaternion): Delete procedure.
(make-quaternion): Support building from axis angle.
(rotate): Remove axis angle special-case.
|
|
|
|
|
|
| |
* sly/wrappers/gl.scm (gl-current-texture): New procedure.
(with-gl-bind-texture): Don't bind texture if already bound. Restore
the previously bound texture after evaluating the body.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* sly/scene.scm (scene-node-positin, scene-node-scale,
scene-node-rotation, interpolate): Delete.
(with-texture-maybe): New macro.
(draw-scene-node): Remove interpolation logic. Add texture binding.
* sly/mesh.scm (mesh-texture): Delete.
(make-mesh): Remove texture parameter.
(draw-mesh): Remove texture binding.
* sly/shape.scm (make-cube): Wrap mesh in a scene node.
* sly/sprite.scm (make-sprite): Likewise.
|
|
|
|
|
| |
* sly/quaternion.scm (axis-angle->quaternion, quaternion->vector,
vector->quaternion): Use match-lambda and record destructuring.
|
|
|
|
|
| |
* sly/quaternion.scm (quaternion->transform): Remove.
(rotate): New procedure.
|
|
|
|
|
|
|
|
|
| |
* sly/color.scm (color-lerp): New procedure.
* sly/math.scm (make-lerp, lerp): New procedures.
* sly/math/vector.scm (vlerp): New procedure.
* sly/transition.scm (interpolator, number-interpolate,
vector-interpolate, color-interpolate): Delete procedures.
(guess-interpolator): Rewrite with 'match-lambda*'.
|
|
|
|
|
|
|
| |
* sly/color.scm (color*): Use pattern matching and allow colors to be
multiplied by scalars.
(color-scale): Delete it.
(color+, color-, color-inverse): Use pattern matching.
|
|
|
|
|
|
|
| |
* sly/match/vector.scm: Export <vector2>, <vector3> and <vector4>.
(vx, vy, vz): Use 'match' more wisely.
* sly/mesh.scm (vertices-bytevector): Destructure vectors.
* sly/transform.scm (translate, scale): Ditto.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* .gitignore: Ignore '*.log' files.
* sly/vector.scm: Delete file.
* sly/math/vector.scm: New file.
* tests/math/vector.scm: New file.
* Makefile.am: Add new file and remove the old one.
* sly/font.scm: Remove import.
* sly/game.scm: Change import.
* sly/joystick.scm (make-directional-signal-raw, make-directional): Use
'vector2'.
* sly/keyboard.scm (key-directions): Use 'vector2'.
* sly/mesh.scm (vertices-bytevector): Use new vector procedures.
* sly/mouse.scm (mouse-position): Use 'vector2'.
* sly/quaternion.scm (axis-angle->quaternion, quaternion->vector,
vector->quaternion): Use new vector procedures.
* sly/rect.scm (rect-position, rect-top-right, rect-bottom-left,
rect-bottom-right, rect-center, rect-size): Use 'vector2'.
* sly/scene.scm (make-scene-node): Use 'vector2'.
* sly/shader.scm: Change import.
* sly/shape.scm (make-cube): Use new vector procedures.
* sly/sprite.scm (make-sprite): Use new vector procedures.
* sly/texture.scm (anchor-texture): Use 'vector2'.
* sly/transform.scm (transform-vector2): Use 'vector2'.
(translate, scale): Use new vector procedures.
* sly/transition.scm (guess-interpolator): Use new vector procedures.
* sly/window.scm (make-window, window-size, open-window): Use 'vector2'.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* sly/game.scm (run-game-loop): Remove scene updating step.
* sly/scene.scm (scene-node-prev-position,
set-scene-node-prev-position!, scene-node-prev-scale,
set-scene-node-prev-scale!, scene-node-prev-rotation,
set-scene-node-prev-rotation!, scene-node-transform,
set-scene-node-transform!, scene-node-dirty?, update-scene-node,
recompute-transform!): Delete procedures.
(make-scene-node): Remove transform caching.
(draw-scene-node): Re-calculate transforms every frame.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* sly/camera.scm (make-camera, orthographic-camera): Remove 'scene'
parameter.
(draw-camera): Delete.
(call-with-camera): New procedure.
* sly/game.scm (start-game-loop): Replace 'camera' parameter with
'scene'.
* sly/scene.scm (make-scene, scene?, update-scene, draw-scene): New
procedures.
(scene-root): Replace.
|
| |
|
|
|
|
| |
* sly/math.scm (2pi): New variable.
|
|
|
|
| |
* sly/sprite.scm (load-sprite): Add 'anchor' and 'color' parameters.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* sly/shader.scm (<uniform>, <attribute>): New data types.
(make-uniform, uniform?, uniform-name, uniform-location,
make-attribute, attribute?, attribute-name, attribute-location,
shader-program-uniforms, shader-program-attributes,
shader-program-uniform-location, shader-program-attribute-location):
New procedures.
(%display-linking-error, %shader-program-linked, uniform-location,
attribute-location): Delete procedures.
(make-shader-program): Look up locations of uniforms/attributes.
(load-shader-program): Add uniforms and attributes parameters.
(load-default-shader): Specify uniforms and attributes.
(uniform-set!): Use shader-program-uniform-location.
|
|
|
|
| |
* TODO.org (Shaders): New item.
|
|
|
|
| |
* sandbox: Update.
|
|
|
|
| |
* examples/2048/2048: Update.
|
|
|
|
| |
* examples/simple.scm: Update.
|
|
|
|
| |
* examples/tilemap.scm: Update it.
|
|
|
|
| |
* examples/scene-graph.scm: Update to use new scene-node DSL.
|
|
|
|
|
| |
* sly/scene.scm (scene-root): Use make-scene-node instead of scene-node.
(scene-node): Create a more pleasant syntax for defining scene nodes.
|
|
|
|
| |
* sly/mesh.scm (draw-mesh): Deference uniform values that are signals.
|