The netwire-vinylglfw-examples package

[Tags:mit, program]

Port of netwire-input-glfw example to VinylGL & GLSL 1.50. Uses Netwire 5 and Vinyl >= 0.4. NetVinylGLFW is a previous combination of Netwire, VinylGL, & GLFW, but its Netwire and Vinyl versions are outdated as of 2016. The combination with STM that it suggests is embraced by netwire-input-glfw.


[Skip to Readme]

Properties

Versions 0.0.0, 1.0.0
Dependencies array, base (>4.5 && <5), bytestring, containers (>=0.5), directory (>=1.2), filepath (==1.3.*), GLFW-b (>=1.4), GLUtil (>=0.7), lens (>=3.9), linear (>=1.1), mtl (>=2.2.1), netwire (>=5), netwire-input, netwire-input-glfw (>=0.0.5 && <=0.0.6), OpenGL (>=2.9.2), transformers, vinyl (>=0.4), vinyl-gl (>=0.2) [details]
License MIT
Author Rand Kleisli
Maintainer runKleisli@openmailbox.org
Category Game
Source repository head: git clone https://github.com/runKleisli/netwire-vinylglfw-examples
Uploaded Sat Oct 22 11:16:56 UTC 2016 by RandKleisli
Distributions NixOS:1.0.0
Downloads 70 total (10 in the last 30 days)
Votes
0 []
Status Docs not available [build log]
All reported builds failed as of 2016-11-14 [all 4 reports]
Hackage Matrix CI

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for netwire-vinylglfw-examples

Readme for netwire-vinylglfw-examples-1.0.0

netwire-vinylglfw-examples

Port of netwire-input-glfw example to VinylGL & GLSL 1.50. Uses Netwire 5 and Vinyl >= 0.4. NetVinylGLFW is a previous combination of Netwire, VinylGL, & GLFW, but its Netwire and Vinyl versions are outdated as of 2016. The combination with STM that it suggests is embraced by netwire-input-glfw.

Usage: Place the executable and the etc folder in the same directory. Change to that directory in the command line and run the executable.

Style progression

Style 0 follows the original structure of the netwire-input-glfw example.

Style 1 shows how the input structuralization step is obviated by the shader programs taking Vinyl records as input to begin with.

Style 2 generalizes renderWire to all render functions of this VinylGL style, and in a way which allows the input record to have extra fields beyond those required by the shader program.

Input structuralization is done upon the data being collected from the appropriate wires, since what renderWire does to the render function is now independent of the input structure.

Allowing the wire to handle records with more fields just separates what data has been collected (in a record structure) from what it's being used for in this case, which is to control the shader program. Taken to an extreme, one could manage a global application state record, as in the VinylGL examples, and render from the data in that record without having to change any types or plumbing to account for the extra fields the record has (or gets as development goes on).