diff --git a/extra/grid-meshes/grid-meshes.factor b/extra/grid-meshes/grid-meshes.factor index b63b3d791c..ebde0b2641 100644 --- a/extra/grid-meshes/grid-meshes.factor +++ b/extra/grid-meshes/grid-meshes.factor @@ -35,12 +35,9 @@ PRIVATE> dup dim>> second iota [ draw-vertex-buffer-row ] with each ] with-gl-buffer ; -USE: tools.time : ( dim -- grid-mesh ) - [ [ ] [ vertex-array >vertex-buffer ] [ first 1 + 2 * ] tri - grid-mesh boa - ] time ; + grid-mesh boa ; M: grid-mesh dispose [ [ delete-gl-buffer ] when* f ] change-buffer diff --git a/extra/terrain/deploy.factor b/extra/terrain/deploy.factor index b51873a5ad..c27e7b3c84 100644 --- a/extra/terrain/deploy.factor +++ b/extra/terrain/deploy.factor @@ -1,14 +1,14 @@ USING: tools.deploy.config ; H{ - { deploy-ui? t } - { deploy-reflection 1 } - { deploy-unicode? f } - { deploy-math? t } - { deploy-io 2 } - { deploy-c-types? f } { deploy-name "Terrain" } - { deploy-word-props? f } - { deploy-word-defs? f } + { deploy-ui? t } + { deploy-c-types? f } + { deploy-unicode? f } + { deploy-io 2 } + { deploy-reflection 2 } { "stop-after-last-window?" t } + { deploy-word-props? f } + { deploy-math? t } { deploy-threads? t } + { deploy-word-defs? f } } diff --git a/extra/terrain/generation/generation.factor b/extra/terrain/generation/generation.factor index e41d107871..86f532bada 100644 --- a/extra/terrain/generation/generation.factor +++ b/extra/terrain/generation/generation.factor @@ -1,13 +1,13 @@ USING: accessors alien.data.map arrays byte-arrays combinators combinators.smart fry grouping images kernel math math.matrices.simd math.order math.vectors noise random -sequences math.vectors.simd ; +sequences math.vectors.simd typed ; FROM: alien.c-types => float uchar ; SIMDS: float uchar ; IN: terrain.generation CONSTANT: terrain-segment-size { 512 512 } -CONSTANT: terrain-segment-size-vector { 512.0 512.0 1.0 1.0 } +CONSTANT: terrain-segment-size-vector float-4{ 512.0 512.0 1.0 1.0 } CONSTANT: terrain-big-noise-scale float-4{ 0.002 0.002 0.002 0.002 } CONSTANT: terrain-small-noise-scale float-4{ 0.05 0.05 0.05 0.05 } @@ -51,7 +51,7 @@ TUPLE: segment image ; ubyte-components >>component-type terrain-segment-size >>dim ; -: terrain-segment ( terrain at -- image ) +TYPED: terrain-segment ( terrain: terrain at: float-4 -- image ) { [ big-noise-segment ] [ small-noise-segment ]