spierce7
05/23/2018, 9:20 PMnapperley
05/23/2018, 11:48 PMspierce7
05/24/2018, 11:40 PMapatrida
05/25/2018, 5:19 AMOptional
class?norman784
05/25/2018, 12:25 PMvertexBuffer
or vertexArrayId
isn’t set the right way, those parts are so strange and awkward for me, I do something similar in Swift and was straight forwardadev_one
05/25/2018, 9:12 PMinterface Article {
val id: Int
val category: Category
}
interface Category {
val id: Int
}
Swift:
@objc
class RealmArticle: Object, KNArticle {
@objc dynamic var id: Int32 = 0
@objc dynamic var category: RealmCategory = RealmCategory() // type does not conform to protocol KNArticle
}
@objc
class RealmCategory: Object, KNCategory {
@objc dynamic var id: Int32 = 0
}
spierce7
05/25/2018, 9:38 PMnorman784
05/28/2018, 11:51 AMval vertexShaderSource: String = "...."
val vertexShader = glCreateShader(GL_VERTEX_SHADER)
glShaderSource(vertexShader, 1, vertexShaderSource, null)
Tried different thinks like .toCValues()
, .cValuesOf()
, .cstr.getPointer(this /* memscoped reference */)
, I find so complicated some of the bindings, don’t know if theres a better way to detect that the variable is a char array and do automatically the convertion between string a char array (and vice versa)
This is how the glShaderSource
looks like in kotlin
public fun glShaderSource(shader: platform.OpenGLCommon.GLuint /* = <http://kotlin.Int|kotlin.Int> */, count: platform.OpenGLCommon.GLsizei /* = <http://kotlin.Int|kotlin.Int> */, string: kotlinx.cinterop.CValuesRef<kotlinx.cinterop.CPointerVar<platform.OpenGLCommon.GLcharVar /* = kotlinx.cinterop.ByteVarOf<platform.OpenGLCommon.GLchar /* = kotlin.Byte */> */> /* = kotlinx.cinterop.CPointerVarOf<kotlinx.cinterop.CPointer<kotlinx.cinterop.ByteVarOf<platform.OpenGLCommon.GLchar /* = kotlin.Byte */>>> */>?, length: kotlinx.cinterop.CValuesRef<platform.OpenGLCommon.GLintVar /* = kotlinx.cinterop.IntVarOf<platform.OpenGLCommon.GLint /* = kotlin.Int */> */>?): kotlin.Unit { /* compiled code */ }
And this is the c function
void glShaderSource( GLuint shader,
GLsizei count,
const GLchar **string,
const GLint *length);
drofwarcs
05/30/2018, 1:26 AMoverride fun tableView(tableView: UITableView, cellForRowAtIndexPath: NSIndexPath): UITableViewCell
from the data source protocol and override fun tableView(tableView: UITableView, didSelectRowAtIndexPath: NSIndexPath)
from the delegate protocol . Is this a known issue and is there a work around besides putting the two methods in different classes?fabianterhorst
05/30/2018, 10:32 AMSam
05/30/2018, 2:18 PM.framework
directory and expecting lipo to do the right thing. In reality I had to provide the full path to the binary inside of the framework directory. Once you have that done you’ll want to copy the headers and .plist
file from one of the source frameworks to your new framework directory.yusuf3000
05/31/2018, 1:34 PMxcodebuild
from command line, and i have a shell script in my project that runs gradlew : "$SRCROOT/../../../gradlew"
. If i build from xcode, it works completely fine, but if i do it from command line then the operation hangs on this line indefinitely. Does anyone know why this would be happening?james
05/31/2018, 3:00 PMKonstantin Petrukhnov
06/01/2018, 6:14 AMolonho
06/01/2018, 1:51 PMrusshwolf
06/04/2018, 12:44 AMMyObject.Companion.foo()
in kotlin code compiling to a framework, what’s the proper way to access it from Swift? The only thing I can figure out how to do is MyObjectCompanion.init().foo()
, but that doesn’t seem right because I don’t want to be creating a new instance of the companion object.yusuf3000
06/04/2018, 2:11 PMSam
06/04/2018, 2:47 PMKonstantin Petrukhnov
06/06/2018, 11:05 AMbreandan
06/06/2018, 1:44 PMspierce7
06/07/2018, 3:23 PMdrofwarcs
06/08/2018, 4:32 AMolonho
06/08/2018, 4:24 PMdisableDesignatedInitializerChecks
definition file support
Binaries:
* https://download.jetbrains.com/kotlin/native/builds/releases/0.7.1/macos/kotlin-native-macos-0.7.1.tar.gz
* https://download.jetbrains.com/kotlin/native/builds/releases/0.7.1/linux/kotlin-native-linux-0.7.1.tar.gz
* https://download.jetbrains.com/kotlin/native/builds/releases/0.7.1/windows/kotlin-native-windows-0.7.1.zip
GitHub release page is https://github.com/JetBrains/kotlin-native/releases/tag/v0.7.1napperley
06/09/2018, 9:41 PMnapperley
06/10/2018, 4:39 AMgildor
06/10/2018, 10:14 AMkartikpatodi
06/10/2018, 5:22 PMrkeazor
06/10/2018, 7:21 PMdrofwarcs
06/10/2018, 11:38 PMnorman784
06/11/2018, 3:17 PMnorman784
06/11/2018, 3:17 PMgaetan
06/11/2018, 6:02 PMolonho
06/12/2018, 7:51 AMnorman784
06/12/2018, 10:02 AMglVertexAttribPointer
null it works kinda (but with the vertex coordinates)olonho
06/13/2018, 3:06 PMnorman784
06/13/2018, 3:57 PMglVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 8 * sizeof(float), (void*)(3 * sizeof(float)));
maybe I can reformulate te question and ask how can I translate to kotlin this (void*)(3 * sizeof(float))
, tried with cValuesOf(3 * FloatVar.size)
and val pointer: FloatVar = alloc(); pointer.value = 3 * FloatVar size; glVertexAttribPointer(...., pointer.prt);
olonho
06/13/2018, 4:33 PMvoid*
is what you indeed want, then 12.toLong().toCPointer()
is what you neednorman784
06/13/2018, 4:49 PMerror: type inference failed: Not enough information to infer parameter T in fun <T : CPointed> Long.toCPointer(): CPointer<T>?
Please specify it explicitly.
olonho
06/13/2018, 4:52 PM12.toLong().toCPointer<COpaque>()
norman784
06/13/2018, 4:56 PM