opengl.textures: use cum-sum0 from math.statistics.
parent
20ff03f5c0
commit
d44ca77cff
|
@ -1,10 +1,10 @@
|
|||
! Copyright (C) 2009, 2010 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: accessors alien.data assocs cache colors.constants
|
||||
destructors kernel opengl opengl.gl opengl.capabilities
|
||||
combinators images images.tessellation grouping sequences math
|
||||
math.vectors generalizations fry arrays namespaces system locals
|
||||
literals specialized-arrays ;
|
||||
USING: accessors alien.data arrays assocs colors.constants
|
||||
combinators destructors fry images images.tessellation kernel
|
||||
literals locals math math.statistics math.vectors namespaces
|
||||
opengl opengl.capabilities opengl.gl sequences
|
||||
specialized-arrays system ;
|
||||
FROM: alien.c-types => int float ;
|
||||
SPECIALIZED-ARRAY: float
|
||||
IN: opengl.textures
|
||||
|
@ -370,8 +370,7 @@ TUPLE: multi-texture < disposable grid display-list loc ;
|
|||
: image-locs ( image-grid -- loc-grid )
|
||||
[ first [ image-dim first ] map ]
|
||||
[ [ first image-dim second ] map ] bi
|
||||
[ 0 [ + ] accumulate nip ] bi@
|
||||
cartesian-product flip ;
|
||||
[ cum-sum0 ] bi@ cartesian-product flip ;
|
||||
|
||||
: <texture-grid> ( image-grid loc -- grid )
|
||||
[ dup image-locs ] dip
|
||||
|
|
Loading…
Reference in New Issue