# HG changeset patch # User sam # Date 1713007363 -25200 # Node ID b382ffab50a3d2c6d830b79d01ebc67db63998cf # Parent f91b3144e52ad92eda3561064e8bafceb2cfd346 did: small cleanup diff -r f91b3144e52a -r b382ffab50a3 semicongine/material.nim --- a/semicongine/material.nim Sat Apr 13 11:55:22 2024 +0700 +++ b/semicongine/material.nim Sat Apr 13 18:22:43 2024 +0700 @@ -95,11 +95,6 @@ initMaterialData(theType = theType, name = theName, attributes = attributes.toTable) const - COLORED_MATERIAL* = MaterialType( - name: "single color material", - vertexAttributes: {"position": Vec3F32}.toTable, - attributes: {"color": Vec4F32}.toTable, - ) VERTEX_COLORED_MATERIAL* = MaterialType( name: "vertex color material", vertexAttributes: { diff -r f91b3144e52a -r b382ffab50a3 semicongine/mesh.nim --- a/semicongine/mesh.nim Sat Apr 13 11:55:22 2024 +0700 +++ b/semicongine/mesh.nim Sat Apr 13 18:22:43 2024 +0700 @@ -100,7 +100,6 @@ mesh.vertexData[attribute] = initDataList(thetype = getDataType[T]()) mesh.vertexData[attribute].setLen(mesh.vertexCount) mesh.vertexData[attribute] = value - # `=`(mesh.vertexData[attribute], value) proc initVertexAttribute*[T](mesh: var MeshObject, attribute: string, value: T) = initVertexAttribute(mesh, attribute, newSeqWith(mesh.vertexCount, value)) proc initVertexAttribute*[T](mesh: var MeshObject, attribute: string) = diff -r f91b3144e52a -r b382ffab50a3 semicongine/vulkan/drawable.nim --- a/semicongine/vulkan/drawable.nim Sat Apr 13 11:55:22 2024 +0700 +++ b/semicongine/vulkan/drawable.nim Sat Apr 13 18:22:43 2024 +0700 @@ -25,8 +25,7 @@ &"Drawable({drawable.name}, elementCount: {drawable.elementCount}, instanceCount: {drawable.instanceCount}, bufferOffsets: {drawable.bufferOffsets})" proc draw*(drawable: Drawable, commandBuffer: VkCommandBuffer, vertexBuffers: Table[MemoryPerformanceHint, Buffer], indexBuffer: Buffer, pipeline: VkPipeline) = - debug "Draw {drawable} with pipeline {pipeline}" - debug "Vertex buffers ", vertexBuffers + debug &"Draw {drawable} with pipeline {pipeline}" var buffers: seq[VkBuffer] var offsets: seq[VkDeviceSize] @@ -37,6 +36,7 @@ offsets.add VkDeviceSize(offset) debug "Binding buffers: ", buffers + debug "with offsets ", offsets commandBuffer.vkCmdBindVertexBuffers( firstBinding = 0'u32, bindingCount = uint32(buffers.len),