comparison src/zamikongine/mesh.nim @ 38:c3c963e7c1a6

did: tons of stuff, input, refactoring, fix some errors, some template improvment, sorry for super-commit
author Sam <sam@basx.dev>
date Wed, 18 Jan 2023 09:52:03 +0700
parents 94c38e4b5782
children
comparison
equal deleted inserted replaced
37:6859bcfabc62 38:c3c963e7c1a6
105 105
106 func squareData*[T:SomeFloat](): auto = PositionAttribute[Vec2[T]]( 106 func squareData*[T:SomeFloat](): auto = PositionAttribute[Vec2[T]](
107 data: @[Vec2[T]([T(0), T(0)]), Vec2[T]([T(0), T(1)]), Vec2[T]([T(1), T(1)]), Vec2[T]([T(1), T(0)])] 107 data: @[Vec2[T]([T(0), T(0)]), Vec2[T]([T(0), T(1)]), Vec2[T]([T(1), T(1)]), Vec2[T]([T(1), T(0)])]
108 ) 108 )
109 func squareIndices*[T:uint16|uint32](): auto = seq[array[3, T]]( 109 func squareIndices*[T:uint16|uint32](): auto = seq[array[3, T]](
110 @[[T(1), T(0), T(3)], [T(2), T(1), T(3)], ] 110 @[[T(0), T(1), T(3)], [T(2), T(1), T(3)]]
111 ) 111 )