From 0c4e6639c4476bcbd52bc569dc3c862bd9825152 Mon Sep 17 00:00:00 2001 From: elect86 Date: Fri, 20 Jul 2018 21:47:28 +0200 Subject: [PATCH 1/3] fixed Rect2D --- src/main/kotlin/vkk/vk.kt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/vkk/vk.kt b/src/main/kotlin/vkk/vk.kt index 61adc12..698032d 100644 --- a/src/main/kotlin/vkk/vk.kt +++ b/src/main/kotlin/vkk/vk.kt @@ -542,7 +542,8 @@ object vk { inline fun PipelineColorBlendAttachmentState(block: VkPipelineColorBlendAttachmentState.() -> Unit): VkPipelineColorBlendAttachmentState = PipelineColorBlendAttachmentState().also(block) inline fun PipelineColorBlendAttachmentState(capacity: Int): VkPipelineColorBlendAttachmentState.Buffer = VkPipelineColorBlendAttachmentState.create(ptr.advance(VkPipelineColorBlendAttachmentState.SIZEOF * capacity), capacity) - inline fun Rect2D(block: VkRect2D.() -> Unit): VkRect2D = VkRect2D.create(ptr.advance(VkRect2D.SIZEOF)).also(block) + inline fun Rect2D(): VkRect2D = VkRect2D.create(ptr.advance(VkRect2D.SIZEOF)) + inline fun Rect2D(block: VkRect2D.() -> Unit): VkRect2D = Rect2D().also(block) inline fun Rect2D(capacity: Int, block: VkRect2D.() -> Unit): VkRect2D.Buffer = VkRect2D.create(ptr.advance(VkRect2D.SIZEOF * capacity), capacity).also { it[0].block() } inline fun SpecializationMapEntry(): VkSpecializationMapEntry = VkSpecializationMapEntry.create(ptr.advance(VkSpecializationMapEntry.SIZEOF)) @@ -1112,12 +1113,12 @@ object vk { inline fun Rect2D(size: Vec2i, offset: Vec2i = Vec2i()) = Rect2D(size.x, size.y, offset.x, offset.y) - inline fun Rect2D(width: Int, height: Int, offsetX: Int, offsetY: Int): VkRect2D.Buffer { - return Rect2D(1) { - extent.width = width - extent.height = height + inline fun Rect2D(offsetX: Int, offsetY: Int, width: Int, height: Int): VkRect2D { + return Rect2D { offset.x = offsetX offset.y = offsetY + extent.width = width + extent.height = height } } From d8e8c1e543af905c9757e806036ed3f6465e0dc4 Mon Sep 17 00:00:00 2001 From: elect86 Date: Thu, 26 Jul 2018 21:54:36 +0200 Subject: [PATCH 2/3] :arrow_up: glm --- ...__com_github_kotlin_graphics_appBuffer_84c9312.xml | 11 ----------- ...uffer_aff415e3566ab5a9da28efcd569fd55b92a16070.xml | 11 ----------- ...Gradle__com_github_kotlin_graphics_gli_6fcc778.xml | 11 ----------- ...s_gli_e885226c97b78946e4a31677399b0014ac732a4d.xml | 11 ----------- ...s_glm_1b99fb5661dd9fc224178b80835fc8edec7b835a.xml | 11 ----------- ...Gradle__com_github_kotlin_graphics_glm_fb0b292.xml | 11 ----------- .../Gradle__org_lwjgl_lwjgl_3_1_7_SNAPSHOT.xml | 4 ++-- ...__org_lwjgl_lwjgl_3_1_7_SNAPSHOT_natives_linux.xml | 4 ++-- ...org_lwjgl_lwjgl_3_1_7_SNAPSHOT_natives_windows.xml | 4 ++-- .../Gradle__org_lwjgl_lwjgl_glfw_3_1_7_SNAPSHOT.xml | 4 ++-- ..._lwjgl_lwjgl_glfw_3_1_7_SNAPSHOT_natives_linux.xml | 4 ++-- ...wjgl_lwjgl_glfw_3_1_7_SNAPSHOT_natives_windows.xml | 4 ++-- ...radle__org_lwjgl_lwjgl_jemalloc_3_1_7_SNAPSHOT.xml | 4 ++-- ...gl_lwjgl_jemalloc_3_1_7_SNAPSHOT_natives_linux.xml | 4 ++-- ..._lwjgl_jemalloc_3_1_7_SNAPSHOT_natives_windows.xml | 4 ++-- .../Gradle__org_lwjgl_lwjgl_openal_3_1_7_SNAPSHOT.xml | 4 ++-- ...wjgl_lwjgl_openal_3_1_7_SNAPSHOT_natives_linux.xml | 4 ++-- ...gl_lwjgl_openal_3_1_7_SNAPSHOT_natives_windows.xml | 4 ++-- .../Gradle__org_lwjgl_lwjgl_opengl_3_1_7_SNAPSHOT.xml | 4 ++-- ...wjgl_lwjgl_opengl_3_1_7_SNAPSHOT_natives_linux.xml | 4 ++-- ...gl_lwjgl_opengl_3_1_7_SNAPSHOT_natives_windows.xml | 4 ++-- .../Gradle__org_lwjgl_lwjgl_stb_3_1_7_SNAPSHOT.xml | 4 ++-- ...g_lwjgl_lwjgl_stb_3_1_7_SNAPSHOT_natives_linux.xml | 4 ++-- ...lwjgl_lwjgl_stb_3_1_7_SNAPSHOT_natives_windows.xml | 4 ++-- .../Gradle__org_lwjgl_lwjgl_vulkan_3_1_7_SNAPSHOT.xml | 4 ++-- build.gradle | 4 ++-- vkk.iml | 7 ++++--- 27 files changed, 44 insertions(+), 109 deletions(-) delete mode 100644 .idea/libraries/Gradle__com_github_kotlin_graphics_appBuffer_84c9312.xml delete mode 100644 .idea/libraries/Gradle__com_github_kotlin_graphics_appBuffer_aff415e3566ab5a9da28efcd569fd55b92a16070.xml delete mode 100644 .idea/libraries/Gradle__com_github_kotlin_graphics_gli_6fcc778.xml delete mode 100644 .idea/libraries/Gradle__com_github_kotlin_graphics_gli_e885226c97b78946e4a31677399b0014ac732a4d.xml delete mode 100644 .idea/libraries/Gradle__com_github_kotlin_graphics_glm_1b99fb5661dd9fc224178b80835fc8edec7b835a.xml delete mode 100644 .idea/libraries/Gradle__com_github_kotlin_graphics_glm_fb0b292.xml diff --git a/.idea/libraries/Gradle__com_github_kotlin_graphics_appBuffer_84c9312.xml b/.idea/libraries/Gradle__com_github_kotlin_graphics_appBuffer_84c9312.xml deleted file mode 100644 index 7bd095c..0000000 --- a/.idea/libraries/Gradle__com_github_kotlin_graphics_appBuffer_84c9312.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_github_kotlin_graphics_appBuffer_aff415e3566ab5a9da28efcd569fd55b92a16070.xml b/.idea/libraries/Gradle__com_github_kotlin_graphics_appBuffer_aff415e3566ab5a9da28efcd569fd55b92a16070.xml deleted file mode 100644 index 4bde82c..0000000 --- a/.idea/libraries/Gradle__com_github_kotlin_graphics_appBuffer_aff415e3566ab5a9da28efcd569fd55b92a16070.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_github_kotlin_graphics_gli_6fcc778.xml b/.idea/libraries/Gradle__com_github_kotlin_graphics_gli_6fcc778.xml deleted file mode 100644 index 9a68684..0000000 --- a/.idea/libraries/Gradle__com_github_kotlin_graphics_gli_6fcc778.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_github_kotlin_graphics_gli_e885226c97b78946e4a31677399b0014ac732a4d.xml b/.idea/libraries/Gradle__com_github_kotlin_graphics_gli_e885226c97b78946e4a31677399b0014ac732a4d.xml deleted file mode 100644 index 3eb0160..0000000 --- a/.idea/libraries/Gradle__com_github_kotlin_graphics_gli_e885226c97b78946e4a31677399b0014ac732a4d.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_github_kotlin_graphics_glm_1b99fb5661dd9fc224178b80835fc8edec7b835a.xml b/.idea/libraries/Gradle__com_github_kotlin_graphics_glm_1b99fb5661dd9fc224178b80835fc8edec7b835a.xml deleted file mode 100644 index ab06e03..0000000 --- a/.idea/libraries/Gradle__com_github_kotlin_graphics_glm_1b99fb5661dd9fc224178b80835fc8edec7b835a.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Gradle__com_github_kotlin_graphics_glm_fb0b292.xml b/.idea/libraries/Gradle__com_github_kotlin_graphics_glm_fb0b292.xml deleted file mode 100644 index 0158ac6..0000000 --- a/.idea/libraries/Gradle__com_github_kotlin_graphics_glm_fb0b292.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_lwjgl_lwjgl_3_1_7_SNAPSHOT.xml b/.idea/libraries/Gradle__org_lwjgl_lwjgl_3_1_7_SNAPSHOT.xml index 70a35f7..e28e9fd 100644 --- a/.idea/libraries/Gradle__org_lwjgl_lwjgl_3_1_7_SNAPSHOT.xml +++ b/.idea/libraries/Gradle__org_lwjgl_lwjgl_3_1_7_SNAPSHOT.xml @@ -1,11 +1,11 @@ - + - + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_lwjgl_lwjgl_3_1_7_SNAPSHOT_natives_linux.xml b/.idea/libraries/Gradle__org_lwjgl_lwjgl_3_1_7_SNAPSHOT_natives_linux.xml index 361204f..a1b3cf3 100644 --- a/.idea/libraries/Gradle__org_lwjgl_lwjgl_3_1_7_SNAPSHOT_natives_linux.xml +++ b/.idea/libraries/Gradle__org_lwjgl_lwjgl_3_1_7_SNAPSHOT_natives_linux.xml @@ -1,11 +1,11 @@ - + - + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_lwjgl_lwjgl_3_1_7_SNAPSHOT_natives_windows.xml b/.idea/libraries/Gradle__org_lwjgl_lwjgl_3_1_7_SNAPSHOT_natives_windows.xml index 1c70f43..c1375ef 100644 --- a/.idea/libraries/Gradle__org_lwjgl_lwjgl_3_1_7_SNAPSHOT_natives_windows.xml +++ b/.idea/libraries/Gradle__org_lwjgl_lwjgl_3_1_7_SNAPSHOT_natives_windows.xml @@ -1,11 +1,11 @@ - + - + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_lwjgl_lwjgl_glfw_3_1_7_SNAPSHOT.xml b/.idea/libraries/Gradle__org_lwjgl_lwjgl_glfw_3_1_7_SNAPSHOT.xml index 5aace51..2e2be55 100644 --- a/.idea/libraries/Gradle__org_lwjgl_lwjgl_glfw_3_1_7_SNAPSHOT.xml +++ b/.idea/libraries/Gradle__org_lwjgl_lwjgl_glfw_3_1_7_SNAPSHOT.xml @@ -1,11 +1,11 @@ - + - + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_lwjgl_lwjgl_glfw_3_1_7_SNAPSHOT_natives_linux.xml b/.idea/libraries/Gradle__org_lwjgl_lwjgl_glfw_3_1_7_SNAPSHOT_natives_linux.xml index 3c92e05..d4caf18 100644 --- a/.idea/libraries/Gradle__org_lwjgl_lwjgl_glfw_3_1_7_SNAPSHOT_natives_linux.xml +++ b/.idea/libraries/Gradle__org_lwjgl_lwjgl_glfw_3_1_7_SNAPSHOT_natives_linux.xml @@ -1,11 +1,11 @@ - + - + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_lwjgl_lwjgl_glfw_3_1_7_SNAPSHOT_natives_windows.xml b/.idea/libraries/Gradle__org_lwjgl_lwjgl_glfw_3_1_7_SNAPSHOT_natives_windows.xml index 02ef3d0..a88f075 100644 --- a/.idea/libraries/Gradle__org_lwjgl_lwjgl_glfw_3_1_7_SNAPSHOT_natives_windows.xml +++ b/.idea/libraries/Gradle__org_lwjgl_lwjgl_glfw_3_1_7_SNAPSHOT_natives_windows.xml @@ -1,11 +1,11 @@ - + - + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_lwjgl_lwjgl_jemalloc_3_1_7_SNAPSHOT.xml b/.idea/libraries/Gradle__org_lwjgl_lwjgl_jemalloc_3_1_7_SNAPSHOT.xml index dbdff4f..2da1575 100644 --- a/.idea/libraries/Gradle__org_lwjgl_lwjgl_jemalloc_3_1_7_SNAPSHOT.xml +++ b/.idea/libraries/Gradle__org_lwjgl_lwjgl_jemalloc_3_1_7_SNAPSHOT.xml @@ -1,11 +1,11 @@ - + - + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_lwjgl_lwjgl_jemalloc_3_1_7_SNAPSHOT_natives_linux.xml b/.idea/libraries/Gradle__org_lwjgl_lwjgl_jemalloc_3_1_7_SNAPSHOT_natives_linux.xml index 1856e2c..d59fc70 100644 --- a/.idea/libraries/Gradle__org_lwjgl_lwjgl_jemalloc_3_1_7_SNAPSHOT_natives_linux.xml +++ b/.idea/libraries/Gradle__org_lwjgl_lwjgl_jemalloc_3_1_7_SNAPSHOT_natives_linux.xml @@ -1,11 +1,11 @@ - + - + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_lwjgl_lwjgl_jemalloc_3_1_7_SNAPSHOT_natives_windows.xml b/.idea/libraries/Gradle__org_lwjgl_lwjgl_jemalloc_3_1_7_SNAPSHOT_natives_windows.xml index 099cab0..e05ebc4 100644 --- a/.idea/libraries/Gradle__org_lwjgl_lwjgl_jemalloc_3_1_7_SNAPSHOT_natives_windows.xml +++ b/.idea/libraries/Gradle__org_lwjgl_lwjgl_jemalloc_3_1_7_SNAPSHOT_natives_windows.xml @@ -1,11 +1,11 @@ - + - + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_lwjgl_lwjgl_openal_3_1_7_SNAPSHOT.xml b/.idea/libraries/Gradle__org_lwjgl_lwjgl_openal_3_1_7_SNAPSHOT.xml index d56aece..b41a53e 100644 --- a/.idea/libraries/Gradle__org_lwjgl_lwjgl_openal_3_1_7_SNAPSHOT.xml +++ b/.idea/libraries/Gradle__org_lwjgl_lwjgl_openal_3_1_7_SNAPSHOT.xml @@ -1,11 +1,11 @@ - + - + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_lwjgl_lwjgl_openal_3_1_7_SNAPSHOT_natives_linux.xml b/.idea/libraries/Gradle__org_lwjgl_lwjgl_openal_3_1_7_SNAPSHOT_natives_linux.xml index 76042fd..eb0a53d 100644 --- a/.idea/libraries/Gradle__org_lwjgl_lwjgl_openal_3_1_7_SNAPSHOT_natives_linux.xml +++ b/.idea/libraries/Gradle__org_lwjgl_lwjgl_openal_3_1_7_SNAPSHOT_natives_linux.xml @@ -1,11 +1,11 @@ - + - + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_lwjgl_lwjgl_openal_3_1_7_SNAPSHOT_natives_windows.xml b/.idea/libraries/Gradle__org_lwjgl_lwjgl_openal_3_1_7_SNAPSHOT_natives_windows.xml index 8abafb0..9313e6c 100644 --- a/.idea/libraries/Gradle__org_lwjgl_lwjgl_openal_3_1_7_SNAPSHOT_natives_windows.xml +++ b/.idea/libraries/Gradle__org_lwjgl_lwjgl_openal_3_1_7_SNAPSHOT_natives_windows.xml @@ -1,11 +1,11 @@ - + - + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_lwjgl_lwjgl_opengl_3_1_7_SNAPSHOT.xml b/.idea/libraries/Gradle__org_lwjgl_lwjgl_opengl_3_1_7_SNAPSHOT.xml index f0124c4..7381e2e 100644 --- a/.idea/libraries/Gradle__org_lwjgl_lwjgl_opengl_3_1_7_SNAPSHOT.xml +++ b/.idea/libraries/Gradle__org_lwjgl_lwjgl_opengl_3_1_7_SNAPSHOT.xml @@ -1,11 +1,11 @@ - + - + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_lwjgl_lwjgl_opengl_3_1_7_SNAPSHOT_natives_linux.xml b/.idea/libraries/Gradle__org_lwjgl_lwjgl_opengl_3_1_7_SNAPSHOT_natives_linux.xml index ef06835..335645e 100644 --- a/.idea/libraries/Gradle__org_lwjgl_lwjgl_opengl_3_1_7_SNAPSHOT_natives_linux.xml +++ b/.idea/libraries/Gradle__org_lwjgl_lwjgl_opengl_3_1_7_SNAPSHOT_natives_linux.xml @@ -1,11 +1,11 @@ - + - + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_lwjgl_lwjgl_opengl_3_1_7_SNAPSHOT_natives_windows.xml b/.idea/libraries/Gradle__org_lwjgl_lwjgl_opengl_3_1_7_SNAPSHOT_natives_windows.xml index 73eb9c2..506e6f4 100644 --- a/.idea/libraries/Gradle__org_lwjgl_lwjgl_opengl_3_1_7_SNAPSHOT_natives_windows.xml +++ b/.idea/libraries/Gradle__org_lwjgl_lwjgl_opengl_3_1_7_SNAPSHOT_natives_windows.xml @@ -1,11 +1,11 @@ - + - + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_lwjgl_lwjgl_stb_3_1_7_SNAPSHOT.xml b/.idea/libraries/Gradle__org_lwjgl_lwjgl_stb_3_1_7_SNAPSHOT.xml index 1133d19..dae063b 100644 --- a/.idea/libraries/Gradle__org_lwjgl_lwjgl_stb_3_1_7_SNAPSHOT.xml +++ b/.idea/libraries/Gradle__org_lwjgl_lwjgl_stb_3_1_7_SNAPSHOT.xml @@ -1,11 +1,11 @@ - + - + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_lwjgl_lwjgl_stb_3_1_7_SNAPSHOT_natives_linux.xml b/.idea/libraries/Gradle__org_lwjgl_lwjgl_stb_3_1_7_SNAPSHOT_natives_linux.xml index 3132cbc..e6909e2 100644 --- a/.idea/libraries/Gradle__org_lwjgl_lwjgl_stb_3_1_7_SNAPSHOT_natives_linux.xml +++ b/.idea/libraries/Gradle__org_lwjgl_lwjgl_stb_3_1_7_SNAPSHOT_natives_linux.xml @@ -1,11 +1,11 @@ - + - + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_lwjgl_lwjgl_stb_3_1_7_SNAPSHOT_natives_windows.xml b/.idea/libraries/Gradle__org_lwjgl_lwjgl_stb_3_1_7_SNAPSHOT_natives_windows.xml index c37a893..87d42a4 100644 --- a/.idea/libraries/Gradle__org_lwjgl_lwjgl_stb_3_1_7_SNAPSHOT_natives_windows.xml +++ b/.idea/libraries/Gradle__org_lwjgl_lwjgl_stb_3_1_7_SNAPSHOT_natives_windows.xml @@ -1,11 +1,11 @@ - + - + \ No newline at end of file diff --git a/.idea/libraries/Gradle__org_lwjgl_lwjgl_vulkan_3_1_7_SNAPSHOT.xml b/.idea/libraries/Gradle__org_lwjgl_lwjgl_vulkan_3_1_7_SNAPSHOT.xml index 616f05c..0253804 100644 --- a/.idea/libraries/Gradle__org_lwjgl_lwjgl_vulkan_3_1_7_SNAPSHOT.xml +++ b/.idea/libraries/Gradle__org_lwjgl_lwjgl_vulkan_3_1_7_SNAPSHOT.xml @@ -1,11 +1,11 @@ - + - + \ No newline at end of file diff --git a/build.gradle b/build.gradle index 07bfa1c..b698d2e 100644 --- a/build.gradle +++ b/build.gradle @@ -35,8 +35,8 @@ dependencies { implementation "$kotlin-reflect:$kotlinVersion" ext.kx = "com.github.kotlin-graphics" - implementation "$kx:gli:6fcc778" - implementation "$kx:appBuffer:84c9312" + implementation "$kx:gli:4f1beb6" + implementation "$kx:appBuffer:177283c" //testCompile 'io.kotlintest:kotlintest-runner-junit5:3.0.6' diff --git a/vkk.iml b/vkk.iml index a4cfb6a..72ec8e3 100644 --- a/vkk.iml +++ b/vkk.iml @@ -19,6 +19,7 @@ +