diff --git a/tutorials/GLWindow.jl b/tutorials/GLWindow.jl new file mode 100644 index 0000000..45953ef --- /dev/null +++ b/tutorials/GLWindow.jl @@ -0,0 +1,44 @@ +""" +GLWindow was/is a package by Simon Danisch et al that wrapped some functionality of +GLFW. I think it's obsoleted now? This little module reimplements only those parts +required to get the tutorials working again. + +https://github.com/JuliaGL/GLWindow.jl + +""" +module GLWindow + +import GLFW + +using ModernGL: GL_TRUE + +export create_glcontext + +# A more comprehensive setting of GLFW window hints. Setting all +# window hints reduces platform variance. +const window_hints = [ + (GLFW.SAMPLES, 4), + (GLFW.DEPTH_BITS, 0), + + (GLFW.ALPHA_BITS, 8), + (GLFW.RED_BITS, 8), + (GLFW.GREEN_BITS, 8), + (GLFW.BLUE_BITS, 8), + (GLFW.STENCIL_BITS, 0), + (GLFW.AUX_BUFFERS, 0), + (GLFW.CONTEXT_VERSION_MAJOR, 3),# minimum OpenGL v. 3 + (GLFW.CONTEXT_VERSION_MINOR, 0),# minimum OpenGL v. 3.0 + (GLFW.OPENGL_PROFILE, GLFW.OPENGL_ANY_PROFILE), + (GLFW.OPENGL_FORWARD_COMPAT, GL_TRUE), +] + +function create_glcontext(title; resolution) + for (key, value) in window_hints + GLFW.WindowHint(key, value) + end + window = GLFW.CreateWindow(resolution..., title) + GLFW.MakeContextCurrent(window) + return window +end + +end diff --git a/tutorials/Manifest.toml b/tutorials/Manifest.toml new file mode 100644 index 0000000..2a963d9 --- /dev/null +++ b/tutorials/Manifest.toml @@ -0,0 +1,595 @@ +# This file is machine-generated - editing it directly is not advised + +[[AbstractFFTs]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "051c95d6836228d120f5f4b984dd5aba1624f716" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "0.5.0" + +[[AxisAlgorithms]] +deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"] +git-tree-sha1 = "a4d07a1c313392a77042855df46c5f534076fab9" +uuid = "13072b0f-2c55-5437-9ae7-d433b7a33950" +version = "1.0.0" + +[[AxisArrays]] +deps = ["Dates", "IntervalSets", "IterTools", "RangeArrays"] +git-tree-sha1 = "f31f50712cbdf40ee8287f0443b57503e34122ef" +uuid = "39de3d68-74b9-583c-8d2d-e117c070f3a9" +version = "0.4.3" + +[[Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[CatIndices]] +deps = ["CustomUnitRanges", "OffsetArrays"] +git-tree-sha1 = "0c91e4fcda51bbd881c5d49ef784460750abcac0" +uuid = "aafaddc9-749c-510e-ac4f-586e18779b91" +version = "0.2.1" + +[[ColorTypes]] +deps = ["FixedPointNumbers", "Random"] +git-tree-sha1 = "c73d9cfc2a9d8433dc77f5bff4bddf46b1d78c20" +uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" +version = "0.10.3" + +[[ColorVectorSpace]] +deps = ["ColorTypes", "Colors", "FixedPointNumbers", "LinearAlgebra", "SpecialFunctions", "Statistics", "StatsBase"] +git-tree-sha1 = "bd0c0c81a39923bc03f9c3b61d89ad816e741002" +uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4" +version = "0.8.5" + +[[Colors]] +deps = ["ColorTypes", "FixedPointNumbers", "InteractiveUtils", "Reexport"] +git-tree-sha1 = "db9c215e2d92379d341e40dd1d5be893af2bfeb2" +uuid = "5ae59095-9a9b-59fe-a467-6f913c188581" +version = "0.12.1" + +[[CompilerSupportLibraries_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "7c4f882c41faa72118841185afc58a2eb00ef612" +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "0.3.3+0" + +[[ComputationalResources]] +git-tree-sha1 = "52cb3ec90e8a8bea0e62e275ba577ad0f74821f7" +uuid = "ed09eef8-17a6-5b46-8889-db040fac31e3" +version = "0.3.2" + +[[CoordinateTransformations]] +deps = ["LinearAlgebra", "Rotations", "StaticArrays"] +git-tree-sha1 = "71333ea3f841bca6c1aa2863f11758eb9b37bfbc" +uuid = "150eb455-5306-5404-9cee-2592286d6298" +version = "0.5.1" + +[[CustomUnitRanges]] +git-tree-sha1 = "0d42a23be3acfb3c58569b28ed3ab8bd67af5ced" +uuid = "dc8bdbbb-1ca9-579f-8c36-e416f6a65cce" +version = "1.0.0" + +[[DataAPI]] +git-tree-sha1 = "176e23402d80e7743fc26c19c681bfb11246af32" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.3.0" + +[[DataStructures]] +deps = ["InteractiveUtils", "OrderedCollections"] +git-tree-sha1 = "af6d9c86e191c917c2276fbede1137e8ea20157f" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.17.17" + +[[Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" + +[[Distances]] +deps = ["LinearAlgebra", "Statistics"] +git-tree-sha1 = "23717536c81b63e250f682b0e0933769eecd1411" +uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" +version = "0.8.2" + +[[Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[EllipsisNotation]] +git-tree-sha1 = "65dad386e877850e6fce4fc77f60fe75a468ce9d" +uuid = "da5c29d0-fa7d-589e-88eb-ea29b0a81949" +version = "0.4.0" + +[[FFTViews]] +deps = ["CustomUnitRanges", "FFTW"] +git-tree-sha1 = "70a0cfd9b1c86b0209e38fbfe6d8231fd606eeaf" +uuid = "4f61f5a4-77b1-5117-aa51-3ab5ef4ef0cd" +version = "0.3.1" + +[[FFTW]] +deps = ["AbstractFFTs", "FFTW_jll", "IntelOpenMP_jll", "Libdl", "LinearAlgebra", "MKL_jll", "Reexport"] +git-tree-sha1 = "b6a74f6dfd9e9d16b765397dc90df03e5a00532e" +uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" +version = "1.2.1" + +[[FFTW_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "6c975cd606128d45d1df432fb812d6eb10fee00b" +uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a" +version = "3.3.9+5" + +[[FileIO]] +deps = ["Pkg"] +git-tree-sha1 = "202335fd24c2776493e198d6c66a6d910400a895" +uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" +version = "1.3.0" + +[[FixedPointNumbers]] +git-tree-sha1 = "3ba9ea634d4c8b289d590403b4a06f8e227a6238" +uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" +version = "0.8.0" + +[[GLAbstraction]] +deps = ["FileIO", "FixedPointNumbers", "ModernGL", "Printf"] +git-tree-sha1 = "5d213c2196fa3214092a5987cbe383d48c4a1cf2" +repo-rev = "master" +repo-url = "https://github.com/JuliaGL/GLAbstraction.jl" +uuid = "ca6e7d0a-b0c9-59ca-8aba-aebf11497e1c" +version = "0.0.0" + +[[GLFW]] +deps = ["GLFW_jll"] +git-tree-sha1 = "7c47cfbfe9e1ff1cf658ff3e739eb1b56ee95cbe" +uuid = "f7f18e0c-5ee9-5ccd-a5bf-e8befd85ed98" +version = "3.2.2" + +[[GLFW_jll]] +deps = ["Libdl", "Libglvnd_jll", "Pkg", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll"] +git-tree-sha1 = "3b04f1dd73f0efa81298a76c9515f306df06f613" +uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" +version = "3.3.2+0" + +[[GeometryTypes]] +deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "StaticArrays"] +git-tree-sha1 = "34bfa994967e893ab2f17b864eec221b3521ba4d" +uuid = "4d00f742-c7ba-57c2-abde-4428a4b178cb" +version = "0.8.3" + +[[Graphics]] +deps = ["Colors", "LinearAlgebra", "NaNMath"] +git-tree-sha1 = "45d684ead5b65c043ad46bd5be750d61c39d7ef8" +uuid = "a2bd30eb-e257-5431-a919-1863eab51364" +version = "1.0.2" + +[[IdentityRanges]] +deps = ["OffsetArrays"] +git-tree-sha1 = "be8fcd695c4da16a1d6d0cd213cb88090a150e3b" +uuid = "bbac6d45-d8f3-5730-bfe4-7a449cd117ca" +version = "0.3.1" + +[[ImageAxes]] +deps = ["AxisArrays", "ImageCore", "MappedArrays", "Reexport", "SimpleTraits"] +git-tree-sha1 = "c0aca8db7e9fddda18c9cebff5d147b0e799d676" +uuid = "2803e5a7-5153-5ecf-9a86-9b4c37f5f5ac" +version = "0.6.4" + +[[ImageContrastAdjustment]] +deps = ["ColorVectorSpace", "ImageCore", "ImageTransformations", "MappedArrays", "Parameters"] +git-tree-sha1 = "d22d89e03c8f617e0ae31886ca60e291b548cf59" +uuid = "f332f351-ec65-5f6a-b3d1-319c6670881a" +version = "0.3.5" + +[[ImageCore]] +deps = ["Colors", "FixedPointNumbers", "Graphics", "MappedArrays", "MosaicViews", "OffsetArrays", "PaddedViews", "Reexport", "Requires"] +git-tree-sha1 = "a652c05f8f374861580d420b420fddf3e2e84312" +uuid = "a09fc81d-aa75-5fe9-8630-4744c3626534" +version = "0.8.14" + +[[ImageDistances]] +deps = ["ColorVectorSpace", "Distances", "ImageCore", "LinearAlgebra", "MappedArrays", "Statistics"] +git-tree-sha1 = "cf9b02b9f5e33c768c223de6d8f7d1b6d0cf4136" +uuid = "51556ac3-7006-55f5-8cb3-34580c88182d" +version = "0.2.7" + +[[ImageFiltering]] +deps = ["CatIndices", "ColorVectorSpace", "ComputationalResources", "DataStructures", "FFTViews", "FFTW", "ImageCore", "ImageMetadata", "LinearAlgebra", "MappedArrays", "OffsetArrays", "Requires", "StaticArrays", "Statistics", "TiledIteration"] +git-tree-sha1 = "c8aebfbdbb2f12665448de007f635a1910b476e4" +uuid = "6a3955dd-da59-5b1f-98d4-e7296123deb5" +version = "0.6.11" + +[[ImageMetadata]] +deps = ["AxisArrays", "ColorVectorSpace", "ImageAxes", "ImageCore", "IndirectArrays"] +git-tree-sha1 = "5c2c78dc11343d83320e790379e0f58de3aa1b7e" +uuid = "bc367c6b-8a6b-528e-b4bd-a4b897500b49" +version = "0.9.1" + +[[ImageMorphology]] +deps = ["ImageCore"] +git-tree-sha1 = "e41dd25ebf8de738a8ff4f1058a1823a7fe509cf" +uuid = "787d08f9-d448-5407-9aad-5290dd7ab264" +version = "0.2.5" + +[[ImageQualityIndexes]] +deps = ["ColorVectorSpace", "ImageCore", "ImageDistances", "ImageFiltering", "MappedArrays", "Statistics"] +git-tree-sha1 = "3af30042a8fe85612a6a106cb20ca2fa1eb67bd6" +uuid = "2996bd0c-7a13-11e9-2da2-2f5ce47296a9" +version = "0.1.4" + +[[ImageShow]] +deps = ["Base64", "FileIO", "ImageCore", "Requires"] +git-tree-sha1 = "c9df184bc7c2e665f971079174aabb7d18f1845f" +uuid = "4e3cecfd-b093-5904-9786-8bbb286a6a31" +version = "0.2.3" + +[[ImageTransformations]] +deps = ["AxisAlgorithms", "ColorVectorSpace", "CoordinateTransformations", "IdentityRanges", "ImageCore", "Interpolations", "OffsetArrays", "StaticArrays"] +git-tree-sha1 = "34e3b7549af44043e37ba321334afa322ec63a9d" +uuid = "02fcd773-0e25-5acc-982a-7f6622650795" +version = "0.8.4" + +[[Images]] +deps = ["AxisArrays", "Base64", "ColorVectorSpace", "FileIO", "Graphics", "ImageAxes", "ImageContrastAdjustment", "ImageCore", "ImageDistances", "ImageFiltering", "ImageMetadata", "ImageMorphology", "ImageQualityIndexes", "ImageShow", "ImageTransformations", "IndirectArrays", "MappedArrays", "OffsetArrays", "Random", "Reexport", "SparseArrays", "StaticArrays", "Statistics", "StatsBase", "TiledIteration"] +git-tree-sha1 = "bc7ecabe5ef4d64fea25660bc5aa514a603e4468" +uuid = "916415d5-f1e6-5110-898d-aaa5f9f070e0" +version = "0.22.2" + +[[IndirectArrays]] +git-tree-sha1 = "c2a145a145dc03a7620af1444e0264ef907bd44f" +uuid = "9b13fd28-a010-5f03-acff-a1bbcff69959" +version = "0.5.1" + +[[IntelOpenMP_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "fb8e1c7a5594ba56f9011310790e03b5384998d6" +uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" +version = "2018.0.3+0" + +[[InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[Interpolations]] +deps = ["AxisAlgorithms", "LinearAlgebra", "OffsetArrays", "Random", "Ratios", "SharedArrays", "SparseArrays", "StaticArrays", "WoodburyMatrices"] +git-tree-sha1 = "2b7d4e9be8b74f03115e64cf36ed2f48ae83d946" +uuid = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" +version = "0.12.10" + +[[IntervalSets]] +deps = ["Dates", "EllipsisNotation", "Statistics"] +git-tree-sha1 = "3b1cef135bc532b3c3401b309e1b8a2a2ba26af5" +uuid = "8197267c-284f-5f27-9208-e0e47529a953" +version = "0.5.1" + +[[IterTools]] +git-tree-sha1 = "05110a2ab1fc5f932622ffea2a003221f4782c18" +uuid = "c8e1da08-722c-5040-9ed9-7db0dc04731e" +version = "1.3.0" + +[[LibGit2]] +deps = ["Printf"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" + +[[Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[Libgcrypt_jll]] +deps = ["Libdl", "Libgpg_error_jll", "Pkg"] +git-tree-sha1 = "7efb7f5e75a0f7323cce366d3e44a2d225c5617a" +uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" +version = "1.8.5+1" + +[[Libglvnd_jll]] +deps = ["Libdl", "Pkg", "Xorg_libX11_jll", "Xorg_libXext_jll"] +git-tree-sha1 = "30a990af9ce535bcba54d1f23f071a7e714f861e" +uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" +version = "1.3.0+1" + +[[Libgpg_error_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "334284a62d6b8592099d28b78c76aefc266c03a2" +uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" +version = "1.36.0+1" + +[[Libiconv_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "e5256a3b0ebc710dbd6da0c0b212164a3681037f" +uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" +version = "1.16.0+2" + +[[LinearAlgebra]] +deps = ["Libdl"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + +[[Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" + +[[MKL_jll]] +deps = ["IntelOpenMP_jll", "Libdl", "Pkg"] +git-tree-sha1 = "720629cc8cbd12c146ca01b661fd1a6cf66e2ff4" +uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" +version = "2019.0.117+2" + +[[MacroTools]] +deps = ["Markdown", "Random"] +git-tree-sha1 = "f7d2e3f654af75f01ec49be82c231c382214223a" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.5" + +[[MappedArrays]] +git-tree-sha1 = "e2a02fe7ee86a10c707ff1756ab1650b40b140bb" +uuid = "dbb5928d-eab1-5f90-85c2-b9b0edb7c900" +version = "0.2.2" + +[[Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[Missings]] +deps = ["DataAPI"] +git-tree-sha1 = "de0a5ce9e5289f27df672ffabef4d1e5861247d5" +uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" +version = "0.4.3" + +[[Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[ModernGL]] +deps = ["Libdl"] +git-tree-sha1 = "326957556e9cc9253615114c04bb0096a2a69bb8" +uuid = "66fc600b-dfda-50eb-8b99-91cfa97b1301" +version = "1.1.2" + +[[MosaicViews]] +deps = ["OffsetArrays", "PaddedViews"] +git-tree-sha1 = "b483b88403ac0ac01667778cbb29462b111b1deb" +uuid = "e94cdb99-869f-56ef-bcf0-1ae2bcbe0389" +version = "0.2.2" + +[[NaNMath]] +git-tree-sha1 = "928b8ca9b2791081dc71a51c55347c27c618760f" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "0.3.3" + +[[OffsetArrays]] +git-tree-sha1 = "930db8ef90483570107f2396b1ffc6680f08e8b7" +uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" +version = "1.0.4" + +[[OpenSpecFun_jll]] +deps = ["CompilerSupportLibraries_jll", "Libdl", "Pkg"] +git-tree-sha1 = "d51c416559217d974a1113522d5919235ae67a87" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.3+3" + +[[OrderedCollections]] +git-tree-sha1 = "12ce190210d278e12644bcadf5b21cbdcf225cd3" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.2.0" + +[[PaddedViews]] +deps = ["OffsetArrays"] +git-tree-sha1 = "100195a79b577d5747db98bf1732c3686285fa1e" +uuid = "5432bcbf-9aad-5242-b902-cca2824c8663" +version = "0.5.5" + +[[Parameters]] +deps = ["OrderedCollections", "UnPack"] +git-tree-sha1 = "38b2e970043613c187bd56a995fe2e551821eb4a" +uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a" +version = "0.12.1" + +[[Pkg]] +deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" + +[[Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + +[[REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" + +[[Random]] +deps = ["Serialization"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[RangeArrays]] +git-tree-sha1 = "b9039e93773ddcfc828f12aadf7115b4b4d225f5" +uuid = "b3c3ace0-ae52-54e7-9d0b-2c1406fd6b9d" +version = "0.3.2" + +[[Ratios]] +git-tree-sha1 = "37d210f612d70f3f7d57d488cb3b6eff56ad4e41" +uuid = "c84ed2f1-dad5-54f0-aa8e-dbefe2724439" +version = "0.4.0" + +[[Reexport]] +deps = ["Pkg"] +git-tree-sha1 = "7b1d07f411bc8ddb7977ec7f377b97b158514fe0" +uuid = "189a3867-3050-52da-a836-e630ba90ab69" +version = "0.2.0" + +[[Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "d37400976e98018ee840e0ca4f9d20baa231dc6b" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.0.1" + +[[Rotations]] +deps = ["LinearAlgebra", "StaticArrays", "Statistics"] +git-tree-sha1 = "d5f83867093db7319a9366d55f29280ecae9bcda" +uuid = "6038ab10-8711-5258-84ad-4b1120ba62dc" +version = "0.13.0" + +[[SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" + +[[Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] +uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" + +[[SimpleTraits]] +deps = ["InteractiveUtils", "MacroTools"] +git-tree-sha1 = "2ee666b24ab8be6a922f9d6c11a86e1a703a7dda" +uuid = "699a6c99-e7fa-54fc-8d76-47d257e15c1d" +version = "0.9.2" + +[[Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[SortingAlgorithms]] +deps = ["DataStructures", "Random", "Test"] +git-tree-sha1 = "03f5898c9959f8115e30bc7226ada7d0df554ddd" +uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" +version = "0.3.1" + +[[SparseArrays]] +deps = ["LinearAlgebra", "Random"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + +[[SpecialFunctions]] +deps = ["OpenSpecFun_jll"] +git-tree-sha1 = "d8d8b8a9f4119829410ecd706da4cc8594a1e020" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "0.10.3" + +[[StaticArrays]] +deps = ["LinearAlgebra", "Random", "Statistics"] +git-tree-sha1 = "5c06c0aeb81bef54aed4b3f446847905eb6cbda0" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "0.12.3" + +[[Statistics]] +deps = ["LinearAlgebra", "SparseArrays"] +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[StatsBase]] +deps = ["DataAPI", "DataStructures", "LinearAlgebra", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics"] +git-tree-sha1 = "a6102b1f364befdb05746f386b67c6b7e3262c45" +uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" +version = "0.33.0" + +[[Test]] +deps = ["Distributed", "InteractiveUtils", "Logging", "Random"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[TiledIteration]] +deps = ["OffsetArrays"] +git-tree-sha1 = "98693daea9bb49aba71eaad6b168b152d2310358" +uuid = "06e1c1a7-607b-532d-9fad-de7d9aa2abac" +version = "0.2.4" + +[[UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" + +[[UnPack]] +git-tree-sha1 = "d4bfa022cd30df012700cf380af2141961bb3bfb" +uuid = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" +version = "1.0.1" + +[[Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" + +[[WoodburyMatrices]] +deps = ["LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "28ffe06d28b1ba8fdb2f36ec7bb079fac81bac0d" +uuid = "efce3f68-66dc-5838-9240-27a6d6f5f9b6" +version = "0.5.2" + +[[XML2_jll]] +deps = ["Libdl", "Libiconv_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "987c02a43fa10a491a5f0f7c46a6d3559ed6a8e2" +uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" +version = "2.9.9+4" + +[[XSLT_jll]] +deps = ["Libdl", "Libgcrypt_jll", "Pkg", "XML2_jll"] +git-tree-sha1 = "c287bbc08773474ab1d12849eb46b961a325e149" +uuid = "aed1982a-8fda-507f-9586-7b0439959a61" +version = "1.1.33+2" + +[[Xorg_libX11_jll]] +deps = ["Libdl", "Pkg", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] +git-tree-sha1 = "bbfb646a5a86dc636041c8ee945799b69d37fdba" +uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" +version = "1.6.9+2" + +[[Xorg_libXau_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "711f2bbdbb0e90b90a71c5ccf835137e2def539a" +uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" +version = "1.0.9+2" + +[[Xorg_libXcursor_jll]] +deps = ["Libdl", "Pkg", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "fd1f86fcb0295a6741409086723d9e7d8f222599" +uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" +version = "1.2.0+2" + +[[Xorg_libXdmcp_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "1ffd7bc9c9d8bba6652516f3402ee1ef5f4cac70" +uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" +version = "1.1.3+2" + +[[Xorg_libXext_jll]] +deps = ["Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "079acccb5437761d93c483f2edb5fc3ed21ea7db" +uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" +version = "1.3.4+2" + +[[Xorg_libXfixes_jll]] +deps = ["Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "2bc6823df6ccd55927bf8441d3d79db2f5874c2a" +uuid = "d091e8ba-531a-589c-9de9-94069b037ed8" +version = "5.0.3+2" + +[[Xorg_libXi_jll]] +deps = ["Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] +git-tree-sha1 = "dedd853f81c1099ada169fb6f9c2b50764c48f06" +uuid = "a51aa0fd-4e3c-5386-b890-e753decda492" +version = "1.7.10+2" + +[[Xorg_libXinerama_jll]] +deps = ["Libdl", "Pkg", "Xorg_libXext_jll"] +git-tree-sha1 = "79f0b3350e62d02a710a7dacfbbc0878aed09d58" +uuid = "d1454406-59df-5ea1-beac-c340f2130bc3" +version = "1.1.4+2" + +[[Xorg_libXrandr_jll]] +deps = ["Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "206e6ab109a2b607e3076eb2cb9b3fa239c467f1" +uuid = "ec84b674-ba8e-5d96-8ba1-2a689ba10484" +version = "1.5.2+2" + +[[Xorg_libXrender_jll]] +deps = ["Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "d5492a36d33359cf93ad573ea5e235cd71728649" +uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" +version = "0.9.10+2" + +[[Xorg_libpthread_stubs_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "ec1e2973e4e624069be95f806dbd7e225fee26c6" +uuid = "14d82f49-176c-5ed1-bb49-ad3f5cbd8c74" +version = "0.1.0+1" + +[[Xorg_libxcb_jll]] +deps = ["Libdl", "Pkg", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] +git-tree-sha1 = "c1efb50fb6a8c40c45451611fbf93feabe5f9611" +uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" +version = "1.13.0+2" + +[[Xorg_xtrans_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "b6e7d70f5fc9e3fde505539194c8caaab3c40ebf" +uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" +version = "1.4.0+1" + +[[Zlib_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "a2e0d558f6031002e380a90613b199e37a8565bf" +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" +version = "1.2.11+10" diff --git a/tutorials/Project.toml b/tutorials/Project.toml new file mode 100644 index 0000000..8dc616f --- /dev/null +++ b/tutorials/Project.toml @@ -0,0 +1,7 @@ +[deps] +FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" +GLAbstraction = "ca6e7d0a-b0c9-59ca-8aba-aebf11497e1c" +GLFW = "f7f18e0c-5ee9-5ccd-a5bf-e8befd85ed98" +GeometryTypes = "4d00f742-c7ba-57c2-abde-4428a4b178cb" +Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0" +ModernGL = "66fc600b-dfda-50eb-8b99-91cfa97b1301" diff --git a/tutorials/drawing_polygons1.jl b/tutorials/drawing_polygons1.jl index 7be4368..b23b96b 100644 --- a/tutorials/drawing_polygons1.jl +++ b/tutorials/drawing_polygons1.jl @@ -51,7 +51,7 @@ vertices = Point2f0[(0, 0.5), (0.5, -0.5), (-0.5, -0.5)] # note Float32 vbo = Ref(GLuint(0)) # initial value is irrelevant, just allocate space glGenBuffers(1, vbo) glBindBuffer(GL_ARRAY_BUFFER, vbo[]) -BufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW) +glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW) # The shaders. Here we do everything manually, but life will get # easier with GLAbstraction. See drawing_polygons5.jl for such an diff --git a/tutorials/drawing_polygons2.jl b/tutorials/drawing_polygons2.jl index cf68425..91044f2 100644 --- a/tutorials/drawing_polygons2.jl +++ b/tutorials/drawing_polygons2.jl @@ -1,9 +1,13 @@ # Another "low-level" example, this one incorporating "Uniforms" -# Here we also introduce the use of GLWindow to simplify context creation. -using ModernGL, GeometryTypes, GLAbstraction, GLWindow +using ModernGL, GeometryTypes, GLAbstraction, GLFW + +# GLWindow.jl is out of date, this small file replaces the functionality we +# need for these tutorials. +include(joinpath(@__DIR__, "GLWindow.jl")) +using .GLWindow # Create the window. This sets all the hints and makes the context current. -window = create_glcontext("Drawing polygons 2", resolution=(800,600)) +window = create_glcontext("Drawing polygons 2", resolution=(800, 600)) # Create the Vertex Array Object (VAO) and make it current # Note that while the tutorial describes this after the attributes (below), @@ -21,7 +25,7 @@ vertices = Point2f0[(0, 0.5), (0.5, -0.5), (-0.5, -0.5)] # note Float32 vbo = Ref(GLuint(0)) # initial value is irrelevant, just allocate space glGenBuffers(1, vbo) glBindBuffer(GL_ARRAY_BUFFER, vbo[]) -BufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW) +glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW) # The shaders. Here we do everything manually, but life will get # easier with GLAbstraction. See drawing_polygons5.jl for such an diff --git a/tutorials/drawing_polygons3.jl b/tutorials/drawing_polygons3.jl index 1580a1c..9602df6 100644 --- a/tutorials/drawing_polygons3.jl +++ b/tutorials/drawing_polygons3.jl @@ -1,5 +1,10 @@ # Another "low-level" example, this one incorporating per-vertex color -using ModernGL, GeometryTypes, GLAbstraction, GLWindow +using ModernGL, GeometryTypes, GLAbstraction, GLFW + +# GLWindow.jl is out of date, this small file replaces the functionality we +# need for these tutorials. +include(joinpath(@__DIR__, "GLWindow.jl")) +using .GLWindow # Create the window. This sets all the hints and makes the context current. window = create_glcontext("Drawing polygons 3", resolution=(800,600)) @@ -22,7 +27,7 @@ vertices = Point{5,Float32}[( 0, 0.5, 1, 0, 0), # red vertex vbo = Ref(GLuint(0)) # initial value is irrelevant, just allocate space glGenBuffers(1, vbo) glBindBuffer(GL_ARRAY_BUFFER, vbo[]) -BufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW) +glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW) # The shaders. Here we do everything manually, but life will get # easier with GLAbstraction. See drawing_polygons5.jl for such an diff --git a/tutorials/drawing_polygons4.jl b/tutorials/drawing_polygons4.jl index ea93171..a2e3332 100644 --- a/tutorials/drawing_polygons4.jl +++ b/tutorials/drawing_polygons4.jl @@ -1,6 +1,11 @@ # Another "low-level" example, this one incorporating per-vertex color # and element arrays -using ModernGL, GeometryTypes, GLAbstraction, GLWindow +using ModernGL, GeometryTypes, GLAbstraction, GLFW + +# GLWindow.jl is out of date, this small file replaces the functionality we +# need for these tutorials. +include(joinpath(@__DIR__, "GLWindow.jl")) +using .GLWindow # Create the window. This sets all the hints and makes the context current. window = create_glcontext("Drawing polygons 4", resolution=(800,600)) @@ -26,13 +31,13 @@ elements = Vec{3,GLuint}[(0,1,2), # the first triangle vbo = Ref(GLuint(0)) # initial value is irrelevant, just allocate space glGenBuffers(1, vbo) glBindBuffer(GL_ARRAY_BUFFER, vbo[]) -BufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW) +glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW) # Create the Element Buffer Object (EBO) ebo = Ref(GLuint(0)) glGenBuffers(1, ebo) glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ebo[]) -BufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(elements), elements, GL_STATIC_DRAW) +glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(elements), elements, GL_STATIC_DRAW) # The shaders. Here we do everything manually, but life will get # easier with GLAbstraction. See drawing_polygons5.jl for such an