forked from gergelydaniel/kgl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a16686
commit b5e7c0c
Showing
5 changed files
with
345 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
kotlin.code.style=official | ||
org.gradle.jvmargs=-Xmx4096M | ||
kotlin.mpp.androidSourceSetLayoutVersion=2 | ||
minigdx.mpp.wasm=true |
150 changes: 150 additions & 0 deletions
150
kgl/src/wasmJsMain/kotlin/com/danielgergely/kgl/Buffer.wasmJs.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
package com.danielgergely.kgl | ||
|
||
public actual abstract class Buffer | ||
|
||
public actual class FloatBuffer() : Buffer() { | ||
actual constructor(buffer: Array<Float>) : this() | ||
|
||
actual constructor(buffer: FloatArray) : this() | ||
|
||
actual constructor(size: Int) : this() | ||
|
||
actual var position: Int | ||
get() = TODO("Not yet implemented") | ||
set(value) {} | ||
|
||
actual fun put(f: Float) { | ||
} | ||
|
||
actual fun put(floatArray: FloatArray) { | ||
} | ||
|
||
actual fun put( | ||
floatArray: FloatArray, | ||
offset: Int, | ||
length: Int, | ||
) { | ||
} | ||
|
||
actual operator fun set( | ||
pos: Int, | ||
f: Float, | ||
) { | ||
} | ||
|
||
actual fun get(): Float { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
actual fun get(floatArray: FloatArray) { | ||
} | ||
|
||
actual fun get( | ||
floatArray: FloatArray, | ||
offset: Int, | ||
length: Int, | ||
) { | ||
} | ||
|
||
actual operator fun get(pos: Int): Float { | ||
TODO("Not yet implemented") | ||
} | ||
} | ||
|
||
public actual class ByteBuffer() : Buffer() { | ||
actual constructor(buffer: Array<Byte>) : this() | ||
|
||
actual constructor(buffer: ByteArray) : this() | ||
|
||
actual constructor(size: Int) : this() | ||
|
||
actual var position: Int | ||
get() = TODO("Not yet implemented") | ||
set(value) {} | ||
|
||
actual fun put(b: Byte) { | ||
} | ||
|
||
actual fun put(byteArray: ByteArray) { | ||
} | ||
|
||
actual fun put( | ||
byteArray: ByteArray, | ||
offset: Int, | ||
length: Int, | ||
) { | ||
} | ||
|
||
actual operator fun set( | ||
pos: Int, | ||
b: Byte, | ||
) { | ||
} | ||
|
||
actual fun get(): Byte { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
actual fun get(byteArray: ByteArray) { | ||
} | ||
|
||
actual fun get( | ||
byteArray: ByteArray, | ||
offset: Int, | ||
length: Int, | ||
) { | ||
} | ||
|
||
actual operator fun get(pos: Int): Byte { | ||
TODO("Not yet implemented") | ||
} | ||
} | ||
|
||
public actual class IntBuffer() : Buffer() { | ||
actual constructor(buffer: Array<Int>) : this() | ||
|
||
actual constructor(buffer: IntArray) : this() | ||
|
||
actual constructor(size: Int) : this() | ||
|
||
actual var position: Int | ||
get() = TODO("Not yet implemented") | ||
set(value) {} | ||
|
||
actual fun put(i: Int) { | ||
} | ||
|
||
actual fun put(intArray: IntArray) { | ||
} | ||
|
||
actual fun put( | ||
intArray: IntArray, | ||
offset: Int, | ||
length: Int, | ||
) { | ||
} | ||
|
||
actual operator fun set( | ||
pos: Int, | ||
i: Int, | ||
) { | ||
} | ||
|
||
actual fun get(): Int { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
actual fun get(intArray: IntArray) { | ||
} | ||
|
||
actual fun get( | ||
intArray: IntArray, | ||
offset: Int, | ||
length: Int, | ||
) { | ||
} | ||
|
||
actual operator fun get(pos: Int): Int { | ||
TODO("Not yet implemented") | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
kgl/src/wasmJsMain/kotlin/com/danielgergely/kgl/Types.wasmJs.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.danielgergely.kgl | ||
|
||
public actual class Shader | ||
|
||
public actual class Program | ||
|
||
public actual class UniformLocation | ||
|
||
public actual class GlBuffer | ||
|
||
public actual class TextureResource { | ||
actual fun dispose() { | ||
} | ||
} | ||
|
||
public actual class Texture | ||
|
||
public actual class VertexArrayObject | ||
|
||
public actual class Framebuffer | ||
|
||
public actual class Renderbuffer |
150 changes: 150 additions & 0 deletions
150
kgl/src/wasmWasiMain/kotlin/com/danielgergely/kgl/Buffer.wasmWasi.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
package com.danielgergely.kgl | ||
|
||
public actual abstract class Buffer() | ||
|
||
public actual class FloatBuffer() : Buffer() { | ||
actual constructor(buffer: Array<Float>) : this() | ||
|
||
actual constructor(buffer: FloatArray) : this() | ||
|
||
actual constructor(size: Int) : this() | ||
|
||
actual var position: Int | ||
get() = TODO("Not yet implemented") | ||
set(value) {} | ||
|
||
actual fun put(f: Float) { | ||
} | ||
|
||
actual fun put(floatArray: FloatArray) { | ||
} | ||
|
||
actual fun put( | ||
floatArray: FloatArray, | ||
offset: Int, | ||
length: Int, | ||
) { | ||
} | ||
|
||
actual operator fun set( | ||
pos: Int, | ||
f: Float, | ||
) { | ||
} | ||
|
||
actual fun get(): Float { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
actual fun get(floatArray: FloatArray) { | ||
} | ||
|
||
actual fun get( | ||
floatArray: FloatArray, | ||
offset: Int, | ||
length: Int, | ||
) { | ||
} | ||
|
||
actual operator fun get(pos: Int): Float { | ||
TODO("Not yet implemented") | ||
} | ||
} | ||
|
||
public actual class ByteBuffer() : Buffer() { | ||
actual constructor(buffer: Array<Byte>) : this() | ||
|
||
actual constructor(buffer: ByteArray) : this() | ||
|
||
actual constructor(size: Int) : this() | ||
|
||
actual var position: Int | ||
get() = TODO("Not yet implemented") | ||
set(value) {} | ||
|
||
actual fun put(b: Byte) { | ||
} | ||
|
||
actual fun put(byteArray: ByteArray) { | ||
} | ||
|
||
actual fun put( | ||
byteArray: ByteArray, | ||
offset: Int, | ||
length: Int, | ||
) { | ||
} | ||
|
||
actual operator fun set( | ||
pos: Int, | ||
b: Byte, | ||
) { | ||
} | ||
|
||
actual fun get(): Byte { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
actual fun get(byteArray: ByteArray) { | ||
} | ||
|
||
actual fun get( | ||
byteArray: ByteArray, | ||
offset: Int, | ||
length: Int, | ||
) { | ||
} | ||
|
||
actual operator fun get(pos: Int): Byte { | ||
TODO("Not yet implemented") | ||
} | ||
} | ||
|
||
public actual class IntBuffer() : Buffer() { | ||
actual constructor(buffer: Array<Int>) : this() | ||
|
||
actual constructor(buffer: IntArray) : this() | ||
|
||
actual constructor(size: Int) : this() | ||
|
||
actual var position: Int | ||
get() = TODO("Not yet implemented") | ||
set(value) {} | ||
|
||
actual fun put(i: Int) { | ||
} | ||
|
||
actual fun put(intArray: IntArray) { | ||
} | ||
|
||
actual fun put( | ||
intArray: IntArray, | ||
offset: Int, | ||
length: Int, | ||
) { | ||
} | ||
|
||
actual operator fun set( | ||
pos: Int, | ||
i: Int, | ||
) { | ||
} | ||
|
||
actual fun get(): Int { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
actual fun get(intArray: IntArray) { | ||
} | ||
|
||
actual fun get( | ||
intArray: IntArray, | ||
offset: Int, | ||
length: Int, | ||
) { | ||
} | ||
|
||
actual operator fun get(pos: Int): Int { | ||
TODO("Not yet implemented") | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
kgl/src/wasmWasiMain/kotlin/com/danielgergely/kgl/Types.wasmWasi.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.danielgergely.kgl | ||
|
||
public actual class Shader | ||
|
||
public actual class Program | ||
|
||
public actual class UniformLocation | ||
|
||
public actual class GlBuffer | ||
|
||
public actual class TextureResource { | ||
actual fun dispose() { | ||
} | ||
} | ||
|
||
public actual class Texture | ||
|
||
public actual class VertexArrayObject | ||
|
||
public actual class Framebuffer | ||
|
||
public actual class Renderbuffer |