myanmarking
04/26/2018, 11:10 AMmyanmarking
04/26/2018, 11:11 AMmyanmarking
04/26/2018, 11:11 AMelect
04/26/2018, 4:32 PMAndreas Sinz
04/26/2018, 4:36 PMVertexInputAttributeDescription
look like?elect
04/26/2018, 4:37 PMAndreas Sinz
04/26/2018, 4:39 PMVertexInputAttributeDescription(2)
?elect
04/26/2018, 4:40 PMelect
04/26/2018, 4:40 PM.Buffer
version represents nothing else than a vector in a continuous memory spaceAndreas Sinz
04/26/2018, 4:59 PMfun createVKVertexInputAttributeDescriptionUpdater(binding: Int, location: Int, format: VkFormat, offset: Int): (VkVertexInputAttributeDescription) -> Unit = {
it.location = location
it.binding = binding
it.format = format
it.offset = offset
}
inline fun VertexInputAttributeDescription(vararg updaters: (VkVertexInputAttributeDescription) -> Unit): VkVertexInputAttributeDescription.Buffer {
val res = VertexInputAttributeDescription(updaters.size)
updaters.forEachIndexed { idx, updater -> updater(res[idx]) }
return res
}
elect
04/26/2018, 5:00 PMcreateVKVertexInputAttributeDescriptionUpdater
for each line..elect
04/26/2018, 5:00 PMelect
04/26/2018, 5:00 PM// Attribute descriptions
val vertexInputAttributes = vk.VertexInputAttributeDescription(
VERTEX_BUFFER_BIND_ID, 0, VkFormat.R32G32B32_SFLOAT, 0, // Location 0: Position
VERTEX_BUFFER_BIND_ID, 1, VkFormat.R32G32B32_SFLOAT, Vec3.size, // Location 1: Color
VERTEX_BUFFER_BIND_ID, 2, VkFormat.R32G32_SFLOAT, Vec3.size * 2, // Location 2 : Texture coordinates
VERTEX_BUFFER_BIND_ID, 3, VkFormat.R32G32B32_SFLOAT, Vec3.size * 2 + Vec2.size) // Location 3 : Normal
elect
04/26/2018, 5:01 PMAndreas Sinz
04/26/2018, 5:02 PMVertexInputAttributeDescription()
will be hugeelect
04/26/2018, 5:03 PMelect
04/26/2018, 5:03 PMtipsy
05/02/2018, 4:42 PMtipsy
05/02/2018, 4:43 PM@FunctionalInterface
interface JsonToObjectMapper {
fun <T> map(json: String, targetClass: Class<T>): T
}
@FunctionalInterface
interface ObjectToJsonMapper {
fun map(obj: Any): String
}
elect
05/04/2018, 1:39 PMtailrec
function.elect
05/04/2018, 1:39 PMvar scrollWindow = window
while (scrollWindow.flags has Wf.ChildWindow && scrollWindow.flags has Wf.NoScrollWithMouse &&
scrollWindow.flags hasnt Wf.NoScrollbar && scrollWindow.flags hasnt Wf.NoInputs && scrollWindow.parentWindow != null)
scrollWindow = scrollWindow.parentWindow!!
elect
05/04/2018, 1:39 PMchristophsturm
05/07/2018, 2:29 PMShawn
05/07/2018, 2:29 PMlist.lastOrNull()
probablychristophsturm
05/07/2018, 2:31 PMchristophsturm
05/07/2018, 2:37 PM"Body is valid JSON but with the wrong parameters."
+ (e.path.lastOrNull()?.fieldName?.let { " This field could not be read: $it" } ?: "")
Shawn
05/07/2018, 2:38 PMchristophsturm
05/07/2018, 2:39 PMShawn
05/07/2018, 2:39 PM