changeset 1001:46344b02df81

did: small cleanup
author sam <sam@basx.dev>
date Sat, 13 Apr 2024 18:22:43 +0700
parents fca1f61c0afc
children 892aa207a5b0
files semicongine/material.nim semicongine/mesh.nim semicongine/vulkan/drawable.nim
diffstat 3 files changed, 2 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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: {
--- 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) =
--- 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),