2008-05-15 00:23:12 -04:00
|
|
|
USING: alien.c-types continuations destructors kernel
|
2008-12-04 21:18:19 -05:00
|
|
|
opengl opengl.gl bunny.model specialized-arrays.float
|
|
|
|
accessors ;
|
2008-02-02 18:33:05 -05:00
|
|
|
IN: bunny.fixed-pipeline
|
|
|
|
|
|
|
|
TUPLE: bunny-fixed-pipeline ;
|
|
|
|
|
|
|
|
: <bunny-fixed-pipeline> ( gadget -- draw )
|
|
|
|
drop
|
2008-04-22 00:14:38 -04:00
|
|
|
bunny-fixed-pipeline new ;
|
2008-02-02 18:33:05 -05:00
|
|
|
|
|
|
|
M: bunny-fixed-pipeline draw-bunny
|
|
|
|
drop
|
|
|
|
GL_LIGHTING glEnable
|
|
|
|
GL_LIGHT0 glEnable
|
|
|
|
GL_COLOR_MATERIAL glEnable
|
2008-11-14 21:18:16 -05:00
|
|
|
GL_LIGHT0 GL_POSITION float-array{ 1.0 -1.0 1.0 1.0 } underlying>> glLightfv
|
2008-02-02 18:33:05 -05:00
|
|
|
GL_FRONT_AND_BACK GL_SHININESS 100.0 glMaterialf
|
|
|
|
GL_FRONT_AND_BACK GL_SPECULAR glColorMaterial
|
|
|
|
GL_FRONT_AND_BACK GL_AMBIENT_AND_DIFFUSE glColorMaterial
|
|
|
|
0.6 0.5 0.5 1.0 glColor4f
|
|
|
|
bunny-geom ;
|
|
|
|
|
|
|
|
M: bunny-fixed-pipeline dispose
|
|
|
|
drop ;
|
|
|
|
|