Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0f35122

Browse filesBrowse files
committed
working
1 parent 64da59d commit 0f35122
Copy full SHA for 0f35122
Expand file treeCollapse file tree

31 files changed

+301
-142
lines changed

‎src/main/kotlin/learnOpenGL/a_gettingStarted/01_hello-window.kt

Copy file name to clipboardExpand all lines: src/main/kotlin/learnOpenGL/a_gettingStarted/01_hello-window.kt
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private class HelloWindow {
5959
fun run() {
6060

6161
// render loop
62-
while (window.shouldNotClose) {
62+
while (window.open) {
6363

6464
// input
6565
processInput(window)
@@ -72,7 +72,7 @@ private class HelloWindow {
7272

7373
fun end() {
7474

75-
window.dispose()
75+
window.destroy()
7676
// glfw: terminate, clearing all previously allocated GLFW resources.
7777
glfw.terminate()
7878
}
@@ -81,7 +81,7 @@ private class HelloWindow {
8181
fun processInput(window: GlfwWindow) {
8282

8383
if (window.pressed(GLFW_KEY_ESCAPE))
84-
window.shouldClose = true
84+
window.close = true
8585
}
8686

8787
/** glfw: whenever the window size changed (by OS or user resize) this callback function executes */

‎src/main/kotlin/learnOpenGL/a_gettingStarted/02_hello-window-clear.kt

Copy file name to clipboardExpand all lines: src/main/kotlin/learnOpenGL/a_gettingStarted/02_hello-window-clear.kt
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private class HelloWindowClear {
5959
fun run() {
6060

6161
// render loop
62-
while (window.shouldNotClose) {
62+
while (window.open) {
6363

6464
// input
6565
processInput(window)
@@ -76,7 +76,7 @@ private class HelloWindowClear {
7676

7777
fun end() {
7878

79-
window.dispose()
79+
window.destroy()
8080
// glfw: terminate, clearing all previously allocated GLFW resources.
8181
glfw.terminate()
8282
}
@@ -85,7 +85,7 @@ private class HelloWindowClear {
8585
private fun processInput(window: GlfwWindow) {
8686

8787
if (window.pressed(GLFW_KEY_ESCAPE))
88-
window.shouldClose = true
88+
window.close = true
8989
}
9090

9191
/** glfw: whenever the window size changed (by OS or user resize) this callback function executes */

‎src/main/kotlin/learnOpenGL/a_gettingStarted/03_hello-triangle.kt

Copy file name to clipboardExpand all lines: src/main/kotlin/learnOpenGL/a_gettingStarted/03_hello-triangle.kt
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ private class HelloTriangle {
164164
fun run() {
165165

166166
// render loop
167-
while (window.shouldNotClose) {
167+
while (window.open) {
168168

169169
// input
170170
processInput(window)
@@ -195,7 +195,7 @@ private class HelloTriangle {
195195

196196
destroyBuffers(vao, vbo, vertices)
197197

198-
window.dispose()
198+
window.destroy()
199199
// glfw: terminate, clearing all previously allocated GLFW resources.
200200
glfw.terminate()
201201
}
@@ -204,7 +204,7 @@ private class HelloTriangle {
204204
fun processInput(window: GlfwWindow) {
205205

206206
if (window.pressed(GLFW_KEY_ESCAPE))
207-
window.shouldClose = true
207+
window.close = true
208208
}
209209

210210
/** glfw: whenever the window size changed (by OS or user resize) this callback function executes */

‎src/main/kotlin/learnOpenGL/a_gettingStarted/04_hello-triangle-indexed.kt

Copy file name to clipboardExpand all lines: src/main/kotlin/learnOpenGL/a_gettingStarted/04_hello-triangle-indexed.kt
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ internal class HelloTriangleIndexed {
185185
fun run() {
186186

187187
// render loop
188-
while (window.shouldNotClose) {
188+
while (window.open) {
189189

190190
// input
191191
processInput(window)
@@ -217,7 +217,7 @@ internal class HelloTriangleIndexed {
217217

218218
destroyBuffers(vao, buffers, vertices, indices)
219219

220-
window.dispose()
220+
window.destroy()
221221
// glfw: terminate, clearing all previously allocated GLFW resources.
222222
glfw.terminate()
223223
}
@@ -226,7 +226,7 @@ internal class HelloTriangleIndexed {
226226
fun processInput(window: GlfwWindow) {
227227

228228
if (window.pressed(GLFW_KEY_ESCAPE))
229-
window.shouldClose = true
229+
window.close = true
230230
}
231231

232232
/** glfw: whenever the window size changed (by OS or user resize) this callback function executes */

‎src/main/kotlin/learnOpenGL/a_gettingStarted/05_shaders-uniform.kt

Copy file name to clipboardExpand all lines: src/main/kotlin/learnOpenGL/a_gettingStarted/05_shaders-uniform.kt
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ private class ShadersUniform {
166166
fun run() {
167167

168168
// render loop
169-
while (window.shouldNotClose) {
169+
while (window.open) {
170170

171171
// input
172172
processInput(window)
@@ -201,7 +201,7 @@ private class ShadersUniform {
201201

202202
destroyBuffers(vao, vbo, vertices)
203203

204-
window.dispose()
204+
window.destroy()
205205
// glfw: terminate, clearing all previously allocated GLFW resources.
206206
glfw.terminate()
207207
}
@@ -210,7 +210,7 @@ private class ShadersUniform {
210210
fun processInput(window: GlfwWindow) {
211211

212212
if (window.pressed(GLFW_KEY_ESCAPE))
213-
window.shouldClose = true
213+
window.close = true
214214
}
215215

216216
/** glfw: whenever the window size changed (by OS or user resize) this callback function executes */

‎src/main/kotlin/learnOpenGL/a_gettingStarted/06_shaders-interpolation.kt

Copy file name to clipboardExpand all lines: src/main/kotlin/learnOpenGL/a_gettingStarted/06_shaders-interpolation.kt
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ private class ShadersInterpolation {
164164
fun run() {
165165

166166
// render loop
167-
while (window.shouldNotClose) {
167+
while (window.open) {
168168

169169
// input
170170
processInput(window)
@@ -190,7 +190,7 @@ private class ShadersInterpolation {
190190

191191
uno.buffer.destroyBuffers(vao, vbo, vertices)
192192

193-
window.dispose()
193+
window.destroy()
194194
// glfw: terminate, clearing all previously allocated GLFW resources.
195195
learnOpenGL.common.glfw.terminate()
196196
}
@@ -199,7 +199,7 @@ private class ShadersInterpolation {
199199
fun processInput(window: learnOpenGL.common.GlfwWindow) {
200200

201201
if (window.pressed(GLFW_KEY_ESCAPE))
202-
window.shouldClose = true
202+
window.close = true
203203
}
204204

205205
/** glfw: whenever the window size changed (by OS or user resize) this callback function executes */

‎src/main/kotlin/learnOpenGL/a_gettingStarted/07_shaders-class.kt

Copy file name to clipboardExpand all lines: src/main/kotlin/learnOpenGL/a_gettingStarted/07_shaders-class.kt
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package learnOpenGL.a_gettingStarted
66

77
import glm.vec3.Vec3
88
import learnOpenGL.common.GlfwWindow
9-
import learnOpenGL.common.Shader
109
import learnOpenGL.common.glfw
1110
import org.lwjgl.glfw.GLFW.GLFW_KEY_ESCAPE
1211
import org.lwjgl.opengl.GL
@@ -114,7 +113,7 @@ private class ShadersClass {
114113
fun run() {
115114

116115
// render loop
117-
while (window.shouldNotClose) {
116+
while (window.open) {
118117

119118
// input
120119
processInput(window)
@@ -142,7 +141,7 @@ private class ShadersClass {
142141

143142
destroyBuffers(vao, vbo, vertices)
144143

145-
window.dispose()
144+
window.destroy()
146145
// glfw: terminate, clearing all previously allocated GLFW resources.
147146
glfw.terminate()
148147
}
@@ -151,7 +150,7 @@ private class ShadersClass {
151150
fun processInput(window: GlfwWindow) {
152151

153152
if (window.pressed(GLFW_KEY_ESCAPE))
154-
window.shouldClose = true
153+
window.close = true
155154
}
156155

157156
/** glfw: whenever the window size changed (by OS or user resize) this callback function executes */

‎src/main/kotlin/learnOpenGL/a_gettingStarted/08_textures.kt

Copy file name to clipboardExpand all lines: src/main/kotlin/learnOpenGL/a_gettingStarted/08_textures.kt
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import org.lwjgl.glfw.GLFW.GLFW_KEY_ESCAPE
1111
import org.lwjgl.opengl.GL
1212
import org.lwjgl.opengl.GL11.*
1313
import org.lwjgl.opengl.GL12.GL_BGR
14-
import org.lwjgl.opengl.GL13
1514
import org.lwjgl.opengl.GL13.GL_TEXTURE0
1615
import org.lwjgl.opengl.GL13.glActiveTexture
1716
import org.lwjgl.opengl.GL15.*
@@ -159,7 +158,7 @@ private class Textures {
159158
fun run() {
160159

161160
// render loop
162-
while (window.shouldNotClose) {
161+
while (window.open) {
163162

164163
// input
165164
processInput(window)
@@ -191,7 +190,7 @@ private class Textures {
191190

192191
destroyBuffers(vao, buffers, vertices, indices)
193192

194-
window.dispose()
193+
window.destroy()
195194
// glfw: terminate, clearing all previously allocated GLFW resources.
196195
glfw.terminate()
197196
}
@@ -200,7 +199,7 @@ private class Textures {
200199
fun processInput(window: GlfwWindow) {
201200

202201
if (window.pressed(GLFW_KEY_ESCAPE))
203-
window.shouldClose = true
202+
window.close = true
204203
}
205204

206205
/** glfw: whenever the window size changed (by OS or user resize) this callback function executes */

‎src/main/kotlin/learnOpenGL/a_gettingStarted/09_textures-combined.kt

Copy file name to clipboardExpand all lines: src/main/kotlin/learnOpenGL/a_gettingStarted/09_textures-combined.kt
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ private class TexturesCombined {
196196
fun run() {
197197

198198
// render loop
199-
while (window.shouldNotClose) {
199+
while (window.open) {
200200

201201
// input
202202
processInput(window)
@@ -231,7 +231,7 @@ private class TexturesCombined {
231231

232232
destroyBuffers(vao, buffers, textures, vertices, indices)
233233

234-
window.dispose()
234+
window.destroy()
235235
// glfw: terminate, clearing all previously allocated GLFW resources.
236236
glfw.terminate()
237237
}
@@ -240,7 +240,7 @@ private class TexturesCombined {
240240
fun processInput(window: GlfwWindow) {
241241

242242
if (window.pressed(GLFW_KEY_ESCAPE))
243-
window.shouldClose = true
243+
window.close = true
244244
}
245245

246246
/** glfw: whenever the window size changed (by OS or user resize) this callback function executes */

‎src/main/kotlin/learnOpenGL/a_gettingStarted/10_transformations.kt

Copy file name to clipboardExpand all lines: src/main/kotlin/learnOpenGL/a_gettingStarted/10_transformations.kt
+3-6Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,12 @@ import org.lwjgl.opengl.GL12.GL_BGR
1616
import org.lwjgl.opengl.GL13.GL_TEXTURE0
1717
import org.lwjgl.opengl.GL13.glActiveTexture
1818
import org.lwjgl.opengl.GL15.*
19-
import org.lwjgl.opengl.GL20
2019
import org.lwjgl.opengl.GL20.glEnableVertexAttribArray
2120
import org.lwjgl.opengl.GL20.glGetUniformLocation
2221
import org.lwjgl.opengl.GL30.*
2322
import uno.buffer.*
2423
import uno.glf.semantic
2524
import uno.gln.*
26-
import uno.gln.ProgramUse.int
27-
import uno.gln.ProgramUse.location
2825
import uno.glsl.Program
2926

3027
fun main(args: Array<String>) {
@@ -198,7 +195,7 @@ private class Transformations {
198195
fun run() {
199196

200197
// render loop
201-
while (window.shouldNotClose) {
198+
while (window.open) {
202199

203200
// input
204201
processInput(window)
@@ -247,7 +244,7 @@ private class Transformations {
247244

248245
destroyBuffers(vao, buffers, textures, vertices, indices)
249246

250-
window.dispose()
247+
window.destroy()
251248
// glfw: terminate, clearing all previously allocated GLFW resources.
252249
glfw.terminate()
253250
}
@@ -256,7 +253,7 @@ private class Transformations {
256253
fun processInput(window: GlfwWindow) {
257254

258255
if (window.pressed(GLFW_KEY_ESCAPE))
259-
window.shouldClose = true
256+
window.close = true
260257
}
261258

262259
/** glfw: whenever the window size changed (by OS or user resize) this callback function executes */

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.