Remove .lib dependencies from bunny
parent
42b580c80a
commit
62737d3778
|
@ -1,6 +1,6 @@
|
|||
USING: arrays bunny.model continuations destructors kernel
|
||||
multiline opengl opengl.shaders opengl.capabilities opengl.gl
|
||||
sequences sequences.lib accessors combinators ;
|
||||
sequences accessors combinators ;
|
||||
IN: bunny.cel-shaded
|
||||
|
||||
STRING: vertex-shader-source
|
||||
|
|
|
@ -2,8 +2,8 @@ USING: accessors alien.c-types arrays combinators destructors
|
|||
http.client io io.encodings.ascii io.files kernel math
|
||||
math.matrices math.parser math.vectors opengl
|
||||
opengl.capabilities opengl.gl opengl.demo-support sequences
|
||||
sequences.lib splitting vectors words
|
||||
specialized-arrays.float specialized-arrays.uint ;
|
||||
splitting vectors words specialized-arrays.float
|
||||
specialized-arrays.uint ;
|
||||
IN: bunny.model
|
||||
|
||||
: numbers ( str -- seq )
|
||||
|
@ -27,7 +27,7 @@ IN: bunny.model
|
|||
vneg normalize ;
|
||||
|
||||
: normal ( ns vs triple -- )
|
||||
[ n ] keep [ rot [ v+ ] change-nth ] each-with2 ;
|
||||
[ n ] keep [ rot [ v+ ] change-nth ] with with each ;
|
||||
|
||||
: normals ( vs is -- ns )
|
||||
over length { 0.0 0.0 0.0 } <array> -rot
|
||||
|
@ -50,10 +50,10 @@ IN: bunny.model
|
|||
] unless ;
|
||||
|
||||
: (draw-triangle) ( ns vs triple -- )
|
||||
[ dup roll nth gl-normal swap nth gl-vertex ] each-with2 ;
|
||||
[ dup roll nth gl-normal swap nth gl-vertex ] with with each ;
|
||||
|
||||
: draw-triangles ( ns vs is -- )
|
||||
GL_TRIANGLES [ [ (draw-triangle) ] each-with2 ] do-state ;
|
||||
GL_TRIANGLES [ [ (draw-triangle) ] with with each ] do-state ;
|
||||
|
||||
TUPLE: bunny-dlist list ;
|
||||
TUPLE: bunny-buffers array element-array nv ni ;
|
||||
|
|
Loading…
Reference in New Issue