File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
site/opengl_visualization Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,9 @@ First we need to get some libraries and we can use add-libs to fetch them.
3939 'org.lwjgl/lwjgl-stb {:mvn/version " 3.3.6" }
4040 'org.lwjgl/lwjgl-stb$natives-linux {:mvn/version " 3.3.6" }
4141 'generateme/fastmath {:mvn/version " 3.0.0-alpha3" }})
42- (require '[clojure.java.io :as io])
42+ (require '[clojure.java.io :as io]
43+ '[clojure.math :refer (PI to-radians)]
44+ '[fastmath.vector :refer (vec3 sub add mult normalize)])
4345(import '[javax.imageio ImageIO]
4446 '[org.lwjgl BufferUtils]
4547 '[org.lwjgl.glfw GLFW]
@@ -178,7 +180,7 @@ Next we need to set up OpenGL rendering for this window.
178180
179181::: {.printedClojure}
180182``` clojure
181- #object[org.lwjgl.opengl.GLCapabilities 0x688b081a " org.lwjgl.opengl.GLCapabilities@688b081a " ]
183+ #object[org.lwjgl.opengl.GLCapabilities 0x7a05815c " org.lwjgl.opengl.GLCapabilities@7a05815c " ]
182184
183185```
184186:::
@@ -1738,7 +1740,6 @@ uniform float resolution;
17381740uniform sampler2D moon;
17391741uniform sampler2D ldem;
17401742in vec3 vpoint;
1741- in mat3 horizon;
17421743out vec4 fragColor;
17431744
17441745vec3 orthogonal_vector(vec3 n)
@@ -2016,6 +2017,7 @@ nil
20162017
20172018
20182019I hope you liked this 3D graphics example.
2020+ You can get an interactive version of the Moon rendering [ here] ( https://github.com/wedesoft/macroexpand-noj-lwjgl ) .
20192021
20202022Note that in practise you will
20212023
Original file line number Diff line number Diff line change 3232; ; 'org.lwjgl/lwjgl-stb {:mvn/version "3.3.6"}
3333; ; 'org.lwjgl/lwjgl-stb$natives-linux {:mvn/version "3.3.6"}
3434; ; 'generateme/fastmath {:mvn/version "3.0.0-alpha3"}})
35- ; ; (require '[clojure.java.io :as io])
35+ ; ; (require '[clojure.java.io :as io]
36+ ; ; '[clojure.math :refer (PI to-radians)]
37+ ; ; '[fastmath.vector :refer (vec3 sub add mult normalize)])
3638; ; (import '[javax.imageio ImageIO]
3739; ; '[org.lwjgl BufferUtils]
3840; ; '[org.lwjgl.glfw GLFW]
@@ -716,7 +718,6 @@ uniform float resolution;
716718uniform sampler2D moon;
717719uniform sampler2D ldem;
718720in vec3 vpoint;
719- in mat3 horizon;
720721out vec4 fragColor;
721722
722723vec3 orthogonal_vector(vec3 n)
@@ -834,6 +835,7 @@ void main()
834835(GLFW/glfwTerminate )
835836
836837; ; I hope you liked this 3D graphics example.
838+ ; ; You can get an interactive version of the Moon rendering [here](https://github.com/wedesoft/macroexpand-noj-lwjgl).
837839; ;
838840; ; Note that in practise you will
839841; ;
You can’t perform that action at this time.
0 commit comments