Skip to content

Commit c8a6d81

Browse files
committed
0.8.3.0-19
1 parent e659e9a commit c8a6d81

File tree

15 files changed

+86
-82
lines changed

15 files changed

+86
-82
lines changed

.github/workflows/build.yml

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,66 @@ name: build
33
on: [ push ]
44

55
jobs:
6+
67
linux:
78
name: 'Linux'
89
runs-on: ubuntu-latest
910

1011
steps:
11-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v3
1213
- uses: gradle/wrapper-validation-action@v1
13-
- name: Set up JDK 1.11
14-
uses: actions/setup-java@v1
14+
- name: Set up JDK 1.8
15+
uses: actions/setup-java@v3
1516
with:
16-
java-version: 11
17+
distribution: temurin
18+
java-version: 8
1719
- name: Grant execute permission for gradlew
1820
run: chmod +x gradlew
1921
# - name: Build with Gradle
2022
# run: ./gradlew build -x dokkaHtml -x dokkaHtmlJar
2123
- uses: burrunan/gradle-cache-action@v1
22-
name: Build scenery
24+
name: Build
2325
with:
24-
arguments: build #-x dokkaHtml -x dokkaHtmlJar -x javadoc -x dokkaJavadocJar
26+
arguments: assemble #-x dokkaHtml -x dokkaHtmlJar -x javadoc -x dokkaJavadocJar
2527
# - name: Cleanup Gradle Cache
2628
# # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
2729
# # Restoring these files from a GitHub Actions cache might cause problems for future builds.
2830
# run: |
2931
# rm -f ~/.gradle/caches/modules-2/modules-2.lock
3032
# rm -f ~/.gradle/caches/modules-2/gc.properties
33+
# - name: Show Working directory content
34+
# run: ls
35+
# - uses: actions/checkout@master
36+
# with:
37+
# repository: kotlin-graphics/mary
38+
# path: ./mary
39+
- name: Show ../.. directory content
40+
run: ls ../..
41+
# - name: move mary up
42+
# run: mv ./mary ../..
43+
# - name: Show Working directory content
44+
# run: ls
45+
# - name: Show ../.. directory content
46+
# run: ls ../..
3147

3248
windows:
3349
name: 'Windows'
3450
runs-on: windows-latest
3551

3652
steps:
37-
- uses: actions/checkout@v2
53+
- uses: actions/checkout@v3
3854
- uses: gradle/wrapper-validation-action@v1
39-
- name: Set up JDK 1.11
40-
uses: actions/setup-java@v1
55+
- name: Set up JDK 1.8
56+
uses: actions/setup-java@v3
4157
with:
42-
java-version: 11
58+
distribution: temurin
59+
java-version: 8
4360
# - name: Build with Gradle
4461
# run: .\gradlew.bat build -x dokkaHtml -x dokkaHtmlJar
4562
- uses: burrunan/gradle-cache-action@v1
46-
name: Build scenery
63+
name: Build
4764
with:
48-
arguments: build #-x dokkaHtml -x dokkaHtmlJar -x javadoc -x dokkaJavadocJar
65+
arguments: assemble #-x dokkaHtml -x dokkaHtmlJar -x javadoc -x dokkaJavadocJar
4966
# - name: Cleanup Gradle Cache
5067
# # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
5168
# # Restoring these files from a GitHub Actions cache might cause problems for future builds.
@@ -58,20 +75,21 @@ jobs:
5875
runs-on: macos-latest
5976

6077
steps:
61-
- uses: actions/checkout@v2
78+
- uses: actions/checkout@v3
6279
- uses: gradle/wrapper-validation-action@v1
63-
- name: Set up JDK 1.11
64-
uses: actions/setup-java@v1
80+
- name: Set up JDK 1.8
81+
uses: actions/setup-java@v3
6582
with:
66-
java-version: 11
83+
distribution: temurin
84+
java-version: 8
6785
- name: Grant execute permission for gradlew
6886
run: chmod +x gradlew
6987
# - name: Build with Gradle
7088
# run: ./gradlew build -x dokkaHtml -x dokkaHtmlJar
7189
- uses: burrunan/gradle-cache-action@v1
72-
name: Build scenery
90+
name: Build
7391
with:
74-
arguments: build #-x dokkaHtml -x dokkaHtmlJar -x javadoc -x dokkaJavadocJar
92+
arguments: assemble #-x dokkaHtml -x dokkaHtmlJar -x javadoc -x dokkaJavadocJar
7593
# - name: Cleanup Gradle Cache
7694
# # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
7795
# # Restoring these files from a GitHub Actions cache might cause problems for future builds.

build.gradle.kts

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import magik.createGithubPublication
22
import magik.github
33
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
44
import org.lwjgl.lwjgl
5-
import org.lwjgl.lwjgl.Module.*
5+
import org.lwjgl.Lwjgl.Module.*
66

77
plugins {
88
kotlin("jvm") version embeddedKotlinVersion
9-
id("org.lwjgl.plugin") version "0.0.29"
10-
id("elect86.magik") version "0.3.1"
9+
id("org.lwjgl.plugin") version "0.0.34"
10+
id("elect86.magik") version "0.3.2"
1111
`maven-publish`
1212
}
1313

@@ -18,9 +18,7 @@ repositories {
1818

1919
dependencies {
2020

21-
implementation("kotlin.graphics:glm:0.9.9.1-5")
22-
implementation("kotlin.graphics:unsigned:3.3.31")
23-
implementation("kotlin.graphics:kool:0.9.68")
21+
api("kotlin.graphics:glm:0.9.9.1-6")
2422

2523
// https://mvnrepository.com/artifact/com.twelvemonkeys.imageio/imageio-core
2624
listOf(/*"-batik",*/ "-bmp", "-core", "-icns", "-iff", "-jpeg", "-metadata", "-pcx", "-pdf", "-pict", "-pnm",
@@ -32,22 +30,19 @@ dependencies {
3230

3331
lwjgl { implementation(jemalloc, opengl) }
3432

35-
testImplementation("io.kotest:kotest-runner-junit5:5.4.1")
36-
testImplementation("io.kotest:kotest-assertions-core:5.4.1")
33+
testImplementation("io.kotest:kotest-runner-junit5:5.5.5")
34+
testImplementation("io.kotest:kotest-assertions-core:5.5.5")
3735
}
3836

39-
kotlin.jvmToolchain {
40-
this as JavaToolchainSpec
41-
languageVersion.set(JavaLanguageVersion.of(8))
42-
}
37+
kotlin.jvmToolchain { languageVersion.set(JavaLanguageVersion.of(8)) }
4338

4439
tasks {
4540
withType<KotlinCompile<*>>().all {
4641
kotlinOptions {
4742
freeCompilerArgs += listOf("-opt-in=kotlin.RequiresOptIn")
4843
}
4944
}
50-
withType<Test>().configureEach { useJUnitPlatform() }
45+
test { useJUnitPlatform() }
5146
}
5247

5348
publishing {
@@ -57,11 +52,7 @@ publishing {
5752
suppressAllPomMetadataWarnings()
5853
}
5954
}
60-
repositories {
61-
github {
62-
domain = "kotlin-graphics/mary"
63-
}
64-
}
55+
repositories { github { domain = "kotlin-graphics/mary" } }
6556
}
6657

67-
java { withSourcesJar() }
58+
java.withSourcesJar()

gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
7-
distributionSha256Sum=f6b8596b10cce501591e92f229816aa4046424f3b24d771751b06779d58c8ec4
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
7+
distributionSha256Sum=ff7bf6a86f09b9b2c40bb8f48b25fc19cf2b2664fd1d220cd7ab833ec758d0d7

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ pluginManagement {
99

1010
gradle.rootProject {
1111
group = "kotlin.graphics"
12-
version = "0.8.3.0-18"
12+
version = "0.8.3.0-19"
1313
}

src/main/kotlin/gli_/Cache.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Cache {
3838

3939
val index = indexCache(layer, face, level)
4040
val offset = storage.baseOffset(baseLayer + layer, baseFace + face, baseLevel + level)
41-
baseAddresses[index] = storage.data().adr + offset
41+
baseAddresses[index] = storage.data().adr.toLong() + offset
4242
}
4343

4444
for (level in 0 until levels) {

src/main/kotlin/gli_/Image.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Image {
3939
storage = Storage(format, extent, 1, 1, 1)
4040
this.format = format
4141
baseLevel = 0
42-
data = MemoryUtil.memByteBuffer(storage!!.data().adr, storage!!.data().remaining())
42+
data = memByteBuffer(storage!!.data().adr.toLong(), storage!!.data().remaining())
4343
size = computeSize(0)
4444
}
4545

@@ -51,7 +51,7 @@ class Image {
5151
storage = Storage(image.storage!!)
5252
this.format = format
5353
baseLevel = image.baseLevel
54-
data = MemoryUtil.memByteBuffer(image.data!!.adr, image.data!!.remaining())
54+
data = memByteBuffer(image.data!!.adr.toLong(), image.data!!.remaining())
5555
size = image.size
5656
assert(format.blockSize == image.format.blockSize)
5757
}
@@ -71,7 +71,7 @@ class Image {
7171

7272
fun computeData(baseLayer: Int, baseFace: Int, baseLevel: Int): ByteBuffer {
7373
val baseOffset = storage!!.baseOffset(baseLayer, baseFace, baseLevel)
74-
return memByteBuffer(storage!!.data().adr + baseOffset, storage!!.data().remaining() - baseOffset)
74+
return memByteBuffer(storage!!.data().adr.toLong() + baseOffset, storage!!.data().remaining() - baseOffset)
7575
}
7676

7777
fun computeSize(level: Int): Int {

src/main/kotlin/gli_/Storage.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Storage {
4343
blockCount = Vec3i(storage.blockCount)
4444
blockExtent = Vec3i(storage.blockExtent)
4545
extent = Vec3i(storage.extent)
46-
data = MemoryUtil.memByteBuffer(storage.data!!.adr, storage.data!!.remaining())
46+
data = MemoryUtil.memByteBuffer(storage.data!!.adr.toLong(), storage.data!!.remaining())
4747
}
4848

4949
constructor(format: Format, extent: Vec3i, layers: Int, faces: Int, levels: Int) {
@@ -120,8 +120,8 @@ class Storage {
120120

121121
val baseOffsetSrc = storageSrc.baseOffset(layerSrc, faceSrc, levelSrc)
122122
val baseOffsetDst = baseOffset(layerDst, faceDst, levelDst)
123-
val imageSrc = storageSrc.data!!.adr + baseOffsetSrc
124-
val imageDst = data!!.adr + baseOffsetDst
123+
val imageSrc = storageSrc.data!!.adr.toLong() + baseOffsetSrc
124+
val imageDst = data!!.adr.toLong() + baseOffsetDst
125125

126126
for (blockIndexZ in 0 until blockCount.z)
127127
for (blockIndexY in 0 until blockCount.y) {

src/main/kotlin/gli_/Texture.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ open class Texture {
262262
blockData: T
263263
) {
264264
val baseOffset = storage!!.baseOffset(layer, face, level)
265-
val baseAddress = storage!!.data().adr + baseOffset
265+
val baseAddress = storage!!.data().adr.toLong() + baseOffset
266266

267267
val blockOffset = texelOffset / storage!!.blockExtent
268268
val blockExtent = texelExtent / storage!!.blockExtent + blockOffset

src/main/kotlin/gli_/gl.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import gli_.detail.FORMAT_PROPERTY_BGRA_TYPE_BIT
55
import gli_.gl.ExternalFormat.*
66
import gli_.gl.InternalFormat.*
77
import gli_.gl.TypeFormat.*
8+
import glm_.has
89
import java.nio.ByteBuffer
910
import java.nio.IntBuffer
1011
import gli_.gl.ExternalFormat.NONE as NONE_

src/main/kotlin/gli_/gli.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package gli_
22

33
import glm_.L
4+
import kool.Address
45
import org.lwjgl.system.MemoryUtil
56

67

@@ -59,11 +60,12 @@ class Java {
5960
}
6061

6162
fun memCopy(src: Long, dst: Long, bytes: Int) = MemoryUtil.memCopy(src, dst, bytes.L)
63+
fun memCopy(src: Address, dst: Address, bytes: Int) = memCopy(src.toLong(), dst.toLong(), bytes)
6264

6365

6466
const val GLI_VERSION_MAJOR = 0
6567
const val GLI_VERSION_MINOR = 8
6668
const val GLI_VERSION_PATCH = 3
6769
const val GLI_VERSION_REVISION = 0
68-
const val GLI_VERSION_BUILD = 18
70+
const val GLI_VERSION_BUILD = 19
6971
const val GLI_VERSION = GLI_VERSION_MAJOR * 1_000 + GLI_VERSION_MINOR * 100 + GLI_VERSION_PATCH * 10 + GLI_VERSION_REVISION + GLI_VERSION_BUILD / 10f

0 commit comments

Comments
 (0)