summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* render: shapes: Allow matrix to be passed to draw-line.David Thompson2018-08-291-5/+12
| | | | * chickadee/render/shapes.scm (draw-line): Add matrix argument.
* scripting: Add repeat macro.David Thompson2018-08-291-0/+8
| | | | * chickadee/scripting.scm (repeat): New syntax.
* Fix error handling logic.David Thompson2018-08-251-7/+15
| | | | | | | * chickadee.scm (call-with-error-handling): Call the correct error handler. Return #t if an error occurred, #f otherwise. (run-game): Reset current-time and buffer after recovering from an error.
* Remove custom backtrace display.David Thompson2018-08-251-9/+0
| | | | | Always printing a backtrace caused double backtraces to be printed when using the default error handler that just re-throws the error.
* git: Ignore html manual build artifacts.David Thompson2018-08-231-0/+1
|
* Update manual to reflect major API changes.David Thompson2018-08-231-242/+132
|
* Add default game loop error handler.David Thompson2018-08-232-5/+11
| | | | | | | * chickadee.scm (default-error-handler): New procedure. (run-game): Set default value for 'error' arg to 'default-error-handler'. * chickadee/sdl.scm (run-game/sdl): Ditto.
* guix: Update guile-sdl2 to latest commit in master.David Thompson2018-08-231-2/+2
|
* Update README.David Thompson2018-08-231-19/+34
|
* Move SDL game loop implementation to its own module.David Thompson2018-08-2312-502/+220
|
* math: vector: Add read syntax.David Thompson2018-08-236-8/+34
| | | | | | | | | * chickadee/math/vector.scm (read-vec): New procedure. Extend reader. * examples/lines.scm: Use new vector read syntax. * examples/nine-patch.scm: Ditto. * examples/sprite.scm: Ditto. * examples/text.scm: Ditto. * examples/tiled.scm: Ditto.
* window: Fix procedure export.David Thompson2018-08-231-1/+1
| | | | * chickadee/window.scm: Export close-window! for real this time.
* Make the game loop modular!David Thompson2018-08-236-207/+195
| | | | | | | | | | | | | | | This is really cool! Now users can plug in whatever backend they'd like and are not forced to use SDL and OpenGL. Thanks to Chris Webber for showing me the Lux library for Racket that does exactly this. * chickadee.scm (run-game): Remove all SDL/OpenGL code, replace with generic render/update keyword arguments. (run-game/sdl): New procedure. * examples/lines.scm: Update for API breakage. * examples/nine-patch.scm: Ditto. * examples/sprite.scm: Ditto. * examples/text.scm: Ditto. * examples/tiled.scm: Ditto.
* Bump to version 0.3.0.David Thompson2018-07-111-1/+1
|
* README: Update guile-sdl2 requirement.David Thompson2018-07-111-1/+1
|
* render: Replace keyword->string from SRFI-88.David Thompson2018-07-111-1/+3
| | | | | | | | | | SRFI-88 introduces a problematic global reader macro that I didn't know about until Ricardo Wurmus reported some strange behavior that was traced back to this SRFI. Thanks to Ludovic Courtes for pointing it out. * chickadee/render.scm: Remove (srfi srfi-88) import. (keyword->string): New procedure.
* guix: Update guile-sdl2 commit.David Thompson2018-07-111-10/+4
|
* guix: Upgrade to Guile 2.2.4.David Thompson2018-07-081-3/+3
|
* Fix Makefile.am.David Thompson2018-06-261-2/+2
| | | | Accidentally removed the wrong buffer.scm!
* Remove problematic OpenGL requirements.David Thompson2018-06-253-16/+6
| | | | | | | | | | | Trying to force certain GL versions and other attributes has only caused problems for potential users thus far. Let's see how far we get by just removing this stuff. * chickadee/window.scm (open-window): Remove OpenGL settings. * chickadee/render/shapes.scm (draw-filled-rect, draw-line): Drop shader version from 330 to 130. * chickadee/render/sprite.scm (default-shader): Same.
* Remove experimental buffer API.David Thompson2018-06-254-470/+15
|
* doc: Add framebuffer docs.David Thompson2018-06-251-0/+38
| | | | * doc/api.texi (Framebuffers): Add basic API documentation.
* Display proper backtraces when there is no game loop error handler.David Thompson2018-06-241-11/+10
| | | | | * chickadee.scm (call-with-error-handling): Do not catch errors when the error hook has nothing in it.
* render: tiled: Add support for external tilesets.David Thompson2018-06-241-3/+13
| | | | | * chickadee/render/tiled.scm (load-tile-map): Handle both internal and external tilesets.
* guix: Use Guile 2.2.2 for now.David Thompson2018-06-241-3/+3
|
* error: Pass error key and args to error hook.David Thompson2018-05-031-2/+2
| | | | | * chickadee.scm (call-with-error-handling): Run hook with error key and args.
* Add game loop error hook.David Thompson2018-05-031-47/+75
| | | | | | | * chickadee.scm (error-hook): New variable. (display-game-loop-error, call-with-error-handling): New procedures. (run-hook*): New syntax. (run-game): Wrap all hooks with error handling.
* render: font: Allow rendering of substrings.David Thompson2018-04-302-4/+12
| | | | | | * chickadee/render/font.scm (draw-text*, draw-text): Add start and end arguments. * doc/api.texi (Fonts): Document new arguments.
* render: tiled: Export draw-tile-map*.David Thompson2018-04-301-1/+2
| | | | * chickadee/render/tiled.scm: Export draw-tile-map*.
* render: tiled: Invert Y coordinates of objects.David Thompson2018-04-291-8/+12
| | | | | * chickadee/render/tiled.scm (load-tile-map): Invert Y coordinate for objects.
* render: tiled: Add tile-map-layer-ref.David Thompson2018-04-291-0/+17
| | | | * chickadee/render/tiled.scm (tile-map-layer-ref): New procedure.
* render: font: Fix bug in font-line-width.David Thompson2018-04-271-1/+1
| | | | | * chickadee/render/font.scm (font-line-width): Fix addition of number with vector, use X coordinate instead.
* Invert Y coordinate in mouse motion event.David Thompson2018-04-211-1/+1
| | | | | | | Reported-By: Christopher Howard <christopher.howard@qlfiles.net> * chickadee.scm (run-game): Invert the Y coordinate received from SDL's mouse motion event.
* render: font: Add font-line-width procedure.David Thompson2018-04-211-0/+12
| | | | * chickadee/render/font.scm (font-line-width): New procedure.
* render: font: Print "?" instead of crashing when character is missing.David Thompson2018-04-211-1/+2
| | | | | * chickadee/render/font.scm (draw-text*): Default to "?" character when the desired character isn't present in the font.
* Update .dir-locals.el.David Thompson2018-03-131-1/+2
|