Skip to content

Commit 6fa4025

Browse files
Merge pull request #85 from wedesoft/main
minor changes to LWJGL/OpenGL article
2 parents ec2aea5 + 5dbc340 commit 6fa4025

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

site/opengl_visualization/main.qmd

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff 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;
17381740
uniform sampler2D moon;
17391741
uniform sampler2D ldem;
17401742
in vec3 vpoint;
1741-
in mat3 horizon;
17421743
out vec4 fragColor;
17431744
17441745
vec3 orthogonal_vector(vec3 n)
@@ -2016,6 +2017,7 @@ nil
20162017

20172018

20182019
I 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

20202022
Note that in practise you will
20212023

src/opengl_visualization/main.clj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
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;
716718
uniform sampler2D moon;
717719
uniform sampler2D ldem;
718720
in vec3 vpoint;
719-
in mat3 horizon;
720721
out vec4 fragColor;
721722
722723
vec3 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
;;

0 commit comments

Comments
 (0)