summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* doc: Fix typo.David Thompson2018-12-051-1/+1
| | | | * doc/api.texi (Sprites): s/diving/dividing/
* render: blend: Fix additive blending mode.David Thompson2018-12-031-1/+1
| | | | | * chickadee/render/blend.scm (apply-blend-mode): Use the correct destination blending factor (one, not zero!) for additive blending.
* math: grid: A couple more optimizations.David Thompson2018-12-021-4/+3
| | | | | | | * chickadee/math/grid.scm (make-grid): Set a high minimum bucket size to avoid rehashing. (grid-move): Use memoized inexact->exact procedure. Fix return value of check procedure being ignored.
* math: grid: Refactor to improve performance a little bit.David Thompson2018-12-021-173/+163
| | | | | | | | There's still a lot of work needed to make the collision grid scale to any reasonable number of moving objects, but this is a first step. * chickadee/math/grid.scm: Big ol' refactor that I can't be bothered to list all the changes for.
* scripting: channel: Update copyright year.David Thompson2018-11-291-1/+1
|
* scripting: channel: Add channel-get! and channel-put! procedures.David Thompson2018-11-292-8/+31
| | | | | | * chickadee/scripting/channel.scm (channel-get!, channel-put!): New procedures. * doc/api.texi [Channels]: Add docs.
* queue: Add queue-length procedure.David Thompson2018-11-291-6/+9
| | | | * chickadee/queue.scm (queue-length): New procedure.
* scripting: channel: Remove unncessary module imports.David Thompson2018-11-291-2/+0
| | | | | * chickadee/scripting/channel.scm: Remove (ice-9 format) and (srfi srfi-11) imports.
* guix: Update development environment to use Guile 2.9.1.David Thompson2018-10-251-6/+39
|
* render: Add gpu-apply/instanced syntax.David Thompson2018-10-251-3/+19
| | | | * chickadee/render.scm (gpu-apply/instanced*, gpu-apply/instanced): New syntax.
* render: buffer: Add render-vertices/instanced procedure.David Thompson2018-10-251-1/+12
| | | | * chickadee/render/buffer.scm (render-vertices/instanced): New procedure.
* render: buffer: Add divisor field to typed buffers.David Thompson2018-10-251-8/+18
| | | | | | | * chickadee/render/buffer.scm (<typed-buffer>)[divisor]: New field. (typed-buffer-divisor): New procedure. (make-typed-buffer, make-streaming-typed-buffer): Add #:divisor argument. (apply-typed-buffer): Setup vertex attribute divisor if there is one.
* render: gl: Add glDrawElementsInstanced binding.David Thompson2018-10-251-3/+12
| | | | * chickadee/render/gl.scm (gl-draw-elements-instanced): New procedure.
* configure: Accept Guile 3.0.v0.3.0David Thompson2018-10-031-1/+1
|
* doc: Document the path finding API.David Thompson2018-10-031-1/+75
|
* Move pathfinding module to math directory.David Thompson2018-10-032-7/+7
|
* doc: Document collision grid API.David Thompson2018-10-021-0/+107
|
* math: grid: Fix docstring in grid-move.David Thompson2018-10-021-1/+1
|
* doc: Document bezier curve API.David Thompson2018-10-021-0/+97
|
* doc: Document the rectangle API.David Thompson2018-09-281-5/+195
|
* doc: Document vector and matrix math APIs.David Thompson2018-09-271-0/+338
|
* math: matrix: Fix a few docstrings.David Thompson2018-09-271-3/+3
| | | | * chickadee/math/matrix.scm: Fix mistakes in docstrings.
* render: texture: Fix bug in framebuffer texture coordinates.David Thompson2018-09-101-1/+1
| | | | | * chickadee/render/texture.scm (make-texture): Don't flip texture horizontally, only vertically.
* render: framebuffer: Flip UV coordinates.David Thompson2018-09-101-0/+1
| | | | | * chickadee/render/framebuffer.scm (make-framebuffer): Flip the texture now that the texture origin is top-left.
* render: texture: Add flip? argument to make-texture.David Thompson2018-09-101-5/+11
| | | | * chickadee/render/texture.scm (make-texture): Add #:flip? keyword argument.
* render: Change texture origin to top-left.David Thompson2018-09-104-49/+37
| | | | | | | | | | | | | This is a pretty big change, but hopefully for the best as this aligns with graphics programs and the glTF standard that uses a top-left origin. We can keep using a lower-left origin for vertices, though. * chickadee/render/texture.scm (surface->texture): Stop flipping pixel rows. * chickadee/render/sprites.scm (draw-sprite-unbatched, sprite-batch-add!, draw-nine-patch*): Adjust texture y-coordinates. * chickadee/render/font.scm (parse-fnt): Stop inverting y coordinates. * chickadee/render/tiled.scm (load-tile-map): Stop inverting tile ids.
* math: vector: Fix vec2-normalize and vec3-normalize.David Thompson2018-09-101-12/+12
| | | | | | * chickadee/math/vector.scm: Move vec2-normalize and vec3-normalize below the definitions of vec2-normalize! and vec3-normalize! so that inlining doesn't screw things up.
* math: vector: Add vec2*, vec2+, and vec2- procedures.David Thompson2018-09-101-0/+21
| | | | * chickadee/math/vector.scm (vec2*, vec2+, vec2-): New procedures.
* render: asset: Don't use mipmaps for now.David Thompson2018-09-071-4/+6
| | | | Chickadee doesn't support them yet.
* render: asset: Use default sampler index of 0 when loading textures.David Thompson2018-09-071-1/+2
|
* render: asset: Removing debug print calls.David Thompson2018-09-071-2/+2
|
* render: scene: Make material factors default to 1.0.David Thompson2018-09-072-7/+7
|
* render: asset: Add material texture parsing and loading.David Thompson2018-09-071-54/+103
| | | | | * chickadee/render/asset.scm (read-gltf): Parse and load all textures referenced by materials.
* render: scene: Apply base color texture and factor.David Thompson2018-09-073-6/+16
| | | | | | | | | * chickadee/render/scene.scm (draw-primitive): Set base color texture and send base color factor as uniform to shader. * data/shaders/pbr/pbr-vert.glsl (texcoord_0): New input attribute. (frag_tex): New output attribute. * data/shaders/pbr/pbr-frag.glsl (frag_tex): New input attribute. (base_color_factor, base_color_texture): New uniforms.
* render: scene: Merge metallic roughness into material record type.David Thompson2018-09-071-44/+40
| | | | | * chickadee/render/scene.scm (<metallic-roughness>): Delete. Merge all fields into <material>.
* render: shader: Add support for vec3 uniform values.David Thompson2018-09-071-5/+5
|
* render: gl: Re-export gl-uniform3fv.David Thompson2018-09-071-0/+1
| | | | * chickadee/render/gl.scm: Export gl-uniform3fv.
* render: scene: Stop allocating matrices when rendering.David Thompson2018-09-061-22/+17
| | | | | | | | | | | * chickadee/render/scene.scm (<primitive>): Add matrix field. (make-primitive): Call %make-primitive with additional matrix arg. (<scene-node>): Add world-matrix field. (make-scene-node): Call %make-scene-node with additional matrix arg. (modelview): Delete. (draw-primitive): Perform matrix multiplication without allocating. (draw-scene-node): Likewise. (draw-scene): Pass pre-built matrix rather than allocating.
* data: shaders: Update WIP PBR shaders.David Thompson2018-09-062-5/+4
| | | | | They don't *anything* related to PBR, but they allow me to test glTF asset loading as I work towards full PBR support.
* render: buffer: Fix pointer argument to glVertexAttribPointer.David Thompson2018-09-061-4/+1
| | | | | | | | | | | | | | | | | This one was a doozy. Took me days to figure out why something wasn't rendering properly and this was the culprit! The last argument, the "pointer" argument, to glVertexAttribPointer is supposed to point to the byte offset to start reading data from the VBO. I thought this meant that I could pass a pointer to an integer that contained the offset. WRONG! The pointer value itself must encode that offset. You can see in the diff that I knew this code didn't work when the offset was 0, but somehow a null pointer worked and I just made that case work while leaving every other offset broken. The more I know! * chickadee/render/buffer.scm (apply-typed-buffer): Pass a pointer whose address is the byte offset of the buffer, rather than a pointer whose dereferenced value is an integer representing the byte offset.
* render: buffer: Use correct data type for index buffer when rendering.David Thompson2018-09-061-6/+6
| | | | | * chickadee/render/buffer.scm (render-vertices): Use the index buffer type rather than assuming it is always unsigned-int.
* render: buffer: Stop using glBufferSubData when creating VBOs.David Thompson2018-09-061-6/+3
| | | | | * chickadee/render/buffer.scm (make-buffer): Remove unnecessary call to glBufferSubData and just use glBufferData to do it all.
* render: buffer: Fixed default typed buffer length calculation.David Thompson2018-09-061-3/+14
| | | | | | * chickadee/render/buffer.scm (num-elements): New procedure. (make-typed-buffer): Default 'length' to the correct value in elements, not bytes, when a custom length is not specified.
* render: buffer: Orphan before mapping only when used for streaming.David Thompson2018-09-061-3/+4
| | | | | * chickdaee/render/buffer.scm (map-buffer!): Orphan buffer data only when the buffer usage is 'stream'.
* render: scene: Add better printers for primitives, meshes, and scenes.David Thompson2018-09-061-0/+17
| | | | | * chickadee/render/scene.scm (display-primitive, display-mesh, display-scene-node): New procedures.
* render: gl: Export gl-point-size.David Thompson2018-09-061-0/+2
| | | | * chickadee/render/gl.scm (gl-point-size): New procedure alias.
* math: Add grid module.David Thompson2018-09-023-0/+493
| | | | | | | * chickadee/math/grid.scm: New file. * examples/grid.scm: New file. * Makefile.am (SOURCES): Add grid module. (EXTRA_DIST): Add grid example.
* Remove default error handler.David Thompson2018-09-022-14/+16
| | | | | | | | * chickadee.scm (default-error-handler): Delete. (call-with-error-handling): Don't catch errors if no handler is specified. (run-game): Default 'error' arg to #f. * chickadee/sdl.scm: (run-game/sdl): Likewise.
* render: shapes: Add simple (but slow) bezier curve rendering.David Thompson2018-08-291-1/+85
| | | | | * chickadee/render/shapes.scm (draw-bezier-curve, draw-bezier-path): New procedures.
* Add bezier curve module.David Thompson2018-08-292-0/+83
| | | | | * chickadee/math/bezier.scm: New file. * Makefile.am (SOURCES): Add it.