# HG changeset patch # User sam # Date 1713007363 -25200 # Node ID 46344b02df81cfaea0e672bb8667f073a8d979fa # Parent fca1f61c0afcfeff1790541af78d21c113d1c9ce did: small cleanup diff -r fca1f61c0afc -r 46344b02df81 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 fca1f61c0afc -r 46344b02df81 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 fca1f61c0afc -r 46344b02df81 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),