Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	.idea/libraries/Gradle__org_lwjgl_lwjgl_3_1_7_SNAPSHOT.xml
#	.idea/libraries/Gradle__org_lwjgl_lwjgl_3_1_7_SNAPSHOT_natives_linux.xml
#	.idea/libraries/Gradle__org_lwjgl_lwjgl_3_1_7_SNAPSHOT_natives_windows.xml
#	.idea/libraries/Gradle__org_lwjgl_lwjgl_glfw_3_1_7_SNAPSHOT.xml
#	.idea/libraries/Gradle__org_lwjgl_lwjgl_glfw_3_1_7_SNAPSHOT_natives_linux.xml
#	.idea/libraries/Gradle__org_lwjgl_lwjgl_glfw_3_1_7_SNAPSHOT_natives_windows.xml
#	.idea/libraries/Gradle__org_lwjgl_lwjgl_jemalloc_3_1_7_SNAPSHOT.xml
#	.idea/libraries/Gradle__org_lwjgl_lwjgl_jemalloc_3_1_7_SNAPSHOT_natives_linux.xml
#	.idea/libraries/Gradle__org_lwjgl_lwjgl_jemalloc_3_1_7_SNAPSHOT_natives_windows.xml
#	.idea/libraries/Gradle__org_lwjgl_lwjgl_openal_3_1_7_SNAPSHOT.xml
#	.idea/libraries/Gradle__org_lwjgl_lwjgl_openal_3_1_7_SNAPSHOT_natives_linux.xml
#	.idea/libraries/Gradle__org_lwjgl_lwjgl_openal_3_1_7_SNAPSHOT_natives_windows.xml
#	.idea/libraries/Gradle__org_lwjgl_lwjgl_opengl_3_1_7_SNAPSHOT.xml
#	.idea/libraries/Gradle__org_lwjgl_lwjgl_opengl_3_1_7_SNAPSHOT_natives_linux.xml
#	.idea/libraries/Gradle__org_lwjgl_lwjgl_opengl_3_1_7_SNAPSHOT_natives_windows.xml
#	.idea/libraries/Gradle__org_lwjgl_lwjgl_stb_3_1_7_SNAPSHOT.xml
#	.idea/libraries/Gradle__org_lwjgl_lwjgl_stb_3_1_7_SNAPSHOT_natives_linux.xml
#	.idea/libraries/Gradle__org_lwjgl_lwjgl_stb_3_1_7_SNAPSHOT_natives_windows.xml
#	.idea/libraries/Gradle__org_lwjgl_lwjgl_vulkan_3_1_7_SNAPSHOT.xml
#	build.gradle
#	vkk.iml
  • Loading branch information
elect86 committed Jul 31, 2018
2 parents 9e3f7df + e9cd98d commit 9dc6cfc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/main/kotlin/vkk/vk.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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
}
}

Expand Down

0 comments on commit 9dc6cfc

Please sign in to comment.