Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
elect86 committed May 16, 2018
1 parent 77c7e99 commit 6c87a49
Show file tree
Hide file tree
Showing 21 changed files with 821 additions and 821 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions Vulkan.iml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.github.kotlin-graphics:assimp:4c219ae7ba8048f7909266f77bb778c0e65ee5da" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.github.kotlin-graphics:uno-sdk:dea48060cb85ebaa456ce6c06891f47b76fff287" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.github.kotlin-graphics:vkk:154c486e71e7ad5ee301b6e65e6be9d697675d9d" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.github.kotlin-graphics:assimp:3f92fc2a92a4964420db5aec9f228d534feec2c2" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.github.kotlin-graphics:uno-sdk:a4bc98637e04a660fd89ce586abd19cfd11f9d1c" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.github.kotlin-graphics:vkk:eb50e291a4e1a308cb4e583309d966ea8cbc1729" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.github.kotlin-graphics:gln:b6f92bf107aa87046bccb5d35edcccb50e767770" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.github.kotlin-graphics:gli:e486e385dfea7707b682a43f9ce8810b1be73506" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: com.github.kotlin-graphics:glm:738c60621c18939ad6093a13cddfe158344edbbe" level="project" />
Expand Down Expand Up @@ -69,9 +69,9 @@
<orderEntry type="library" scope="PROVIDED" name="Gradle: graphics.scenery:spirvcrossj:0.4.0:natives-linux" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: org.jetbrains:annotations:13.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Gradle: org.slf4j:slf4j-api:1.7.25" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Gradle: com.github.kotlin-graphics:assimp:4c219ae7ba8048f7909266f77bb778c0e65ee5da" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Gradle: com.github.kotlin-graphics:uno-sdk:dea48060cb85ebaa456ce6c06891f47b76fff287" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Gradle: com.github.kotlin-graphics:vkk:154c486e71e7ad5ee301b6e65e6be9d697675d9d" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Gradle: com.github.kotlin-graphics:assimp:3f92fc2a92a4964420db5aec9f228d534feec2c2" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Gradle: com.github.kotlin-graphics:uno-sdk:a4bc98637e04a660fd89ce586abd19cfd11f9d1c" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Gradle: com.github.kotlin-graphics:vkk:eb50e291a4e1a308cb4e583309d966ea8cbc1729" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Gradle: com.github.kotlin-graphics:gln:b6f92bf107aa87046bccb5d35edcccb50e767770" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Gradle: com.github.kotlin-graphics:gli:e486e385dfea7707b682a43f9ce8810b1be73506" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Gradle: com.github.kotlin-graphics:glm:738c60621c18939ad6093a13cddfe158344edbbe" level="project" />
Expand Down Expand Up @@ -106,9 +106,9 @@
<orderEntry type="library" scope="RUNTIME" name="Gradle: graphics.scenery:spirvcrossj:0.4.0:natives-linux" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Gradle: org.jetbrains:annotations:13.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Gradle: org.slf4j:slf4j-api:1.7.25" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.github.kotlin-graphics:assimp:4c219ae7ba8048f7909266f77bb778c0e65ee5da" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.github.kotlin-graphics:uno-sdk:dea48060cb85ebaa456ce6c06891f47b76fff287" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.github.kotlin-graphics:vkk:154c486e71e7ad5ee301b6e65e6be9d697675d9d" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.github.kotlin-graphics:assimp:3f92fc2a92a4964420db5aec9f228d534feec2c2" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.github.kotlin-graphics:uno-sdk:a4bc98637e04a660fd89ce586abd19cfd11f9d1c" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.github.kotlin-graphics:vkk:eb50e291a4e1a308cb4e583309d966ea8cbc1729" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.github.kotlin-graphics:gln:b6f92bf107aa87046bccb5d35edcccb50e767770" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.github.kotlin-graphics:gli:e486e385dfea7707b682a43f9ce8810b1be73506" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.github.kotlin-graphics:glm:738c60621c18939ad6093a13cddfe158344edbbe" level="project" />
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ dependencies {

ext.kx = 'com.github.kotlin-graphics'
implementation "$kx:glm:738c60621c18939ad6093a13cddfe158344edbbe"
implementation "$kx:vkk:154c486e71e7ad5ee301b6e65e6be9d697675d9d"
implementation "$kx:uno-sdk:dea48060cb85ebaa456ce6c06891f47b76fff287"
implementation "$kx:assimp:4c219ae7ba8048f7909266f77bb778c0e65ee5da"
implementation "$kx:vkk:eb50e291a4e1a308cb4e583309d966ea8cbc1729"
implementation "$kx:uno-sdk:a4bc98637e04a660fd89ce586abd19cfd11f9d1c"
implementation "$kx:assimp:3f92fc2a92a4964420db5aec9f228d534feec2c2"
// implementation "$kx:imgui:6aea5d675ec24b45ffda10e9106eb47656c049b2"

implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:0.21"
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/vulkan/basics/02 Pipelines.kt
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ private class Pipelines : VulkanExampleBase() {
.rotateAssign(rotation.y.rad, 0f, 1f, 0f)
.rotateAssign(rotation.z.rad, 0f, 0f, 1f)

uboVS to uniformBuffer.mapped[0]
uboVS to uniformBuffer.mapped
}

fun draw() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/vulkan/basics/03 Descriptor Sets.kt
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ private class DescriptorSets : VulkanExampleBase() {
.rotateAssign(cube.rotation.y.rad, 0f, 1f, 0f)
.rotateAssign(cube.rotation.z.rad, 0f, 0f, 1f)
}
cube.matrices to cube.uniformBuffer.mapped[0]
cube.matrices to cube.uniformBuffer.mapped
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/vulkan/basics/04 Dynamic Uniform Buffers.kt
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ private class DynamicUniformBuffers : VulkanExampleBase() {
uboVS.projection put camera.matrices.perspective
uboVS.view put camera.matrices.view

uboVS to uniformBuffers.view.mapped[0]
uboVS to uniformBuffers.view.mapped
}

fun updateDynamicUniformBuffer(force: Boolean = false) {
Expand Down Expand Up @@ -415,7 +415,7 @@ private class DynamicUniformBuffers : VulkanExampleBase() {

animationTimer = 0f

memCopy(uboDataDynamic.address, uniformBuffers.dynamic.mapped[0], uniformBuffers.dynamic.size)
memCopy(uboDataDynamic.address, uniformBuffers.dynamic.mapped, uniformBuffers.dynamic.size)
// Flush to make changes visible to the host
val memoryRange = vk.MappedMemoryRange {
memory = uniformBuffers.dynamic.memory
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/vulkan/basics/05 Push Constants.kt
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ private class PushConstants : VulkanExampleBase() {
.rotateAssign(rotation.y.rad, 0f, 1f, 0f)
.rotateAssign(rotation.z.rad, 0f, 0f, 1f)

uboVS to uniformBuffer.mapped[0]
uboVS to uniformBuffer.mapped
}

fun draw() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ class SpecializationConstants : VulkanExampleBase() {
uboVS.projection = camera.matrices.perspective
uboVS.modelView = camera.matrices.view

uboVS to uniformBuffer.mapped[0]
uboVS to uniformBuffer.mapped
}

fun draw() {
Expand Down
6 changes: 3 additions & 3 deletions src/main/kotlin/vulkan/basics/07 Texture.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ package vulkan.basics

import gli_.gli
import glm_.L
import glm_.buffer.adr
import glm_.f
import glm_.func.rad
import glm_.glm
Expand Down Expand Up @@ -242,9 +243,8 @@ private class Texture : VulkanExampleBase() {
device.bindBufferMemory(stagingBuffer, stagingMemory)

// Copy texture data into staging buffer
val data = appBuffer.pointer
device.mapMemory(stagingMemory, 0, memReqs.size, 0, data)
memCopy(memAddress(tex2D.data()), memGetAddress(data), tex2D.size.L)
val data = device.mapMemory(stagingMemory, 0, memReqs.size)
memCopy(tex2D.data().adr, data, tex2D.size.L)
device unmapMemory stagingMemory

// Setup buffer copy regions for each mip level
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/vulkan/basics/08 Texture Cubemap.kt
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ private class TextureCubemap : VulkanExampleBase() {
.rotateAssign(rotation.y.rad, 0f, 1f, 0f)
.rotateAssign(rotation.z.rad, 0f, 0f, 1f)

uboVS to uniformBuffers.`object`.mapped[0]
uboVS to uniformBuffers.`object`.mapped

// Skybox
viewMatrix put 1f
Expand All @@ -535,7 +535,7 @@ private class TextureCubemap : VulkanExampleBase() {
.rotateAssign(rotation.y.rad, 0f, 1f, 0f)
.rotateAssign(rotation.z.rad, 0f, 0f, 1f)

uboVS to uniformBuffers.skybox.mapped[0]
uboVS to uniformBuffers.skybox.mapped
}

fun draw() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/vulkan/basics/09 Texture Array.kt
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ class TextureArray : VulkanExampleBase() {
.rotateAssign(rotation.z.rad, 0f, 0f, 1f)

// Only update the matrices part of the uniform buffer
uboVS.matrices to uniformBufferVS.mapped[0]
uboVS.matrices to uniformBufferVS.mapped
}

fun draw() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/vulkan/basics/11 Model Rendering.kt
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ private class ModelRendering : VulkanExampleBase() {
.rotateAssign(rotation.y.rad, 0f, 1f, 0f)
.rotateAssign(rotation.z.rad, 0f, 0f, 1f)

uboVS to uniformBuffers.scene.mapped[0]
uboVS to uniformBuffers.scene.mapped
}

fun draw() {
Expand Down
Loading

0 comments on commit 6c87a49

Please sign in to comment.