1 USING: alien.c-types continuations destructors kernel
2 opengl opengl.gl bunny.model ;
3 IN: bunny.fixed-pipeline
5 TUPLE: bunny-fixed-pipeline ;
7 : <bunny-fixed-pipeline> ( gadget -- draw )
9 bunny-fixed-pipeline new ;
11 M: bunny-fixed-pipeline draw-bunny
15 GL_COLOR_MATERIAL glEnable
16 GL_LIGHT0 GL_POSITION { 1.0 -1.0 1.0 1.0 } >c-float-array glLightfv
17 GL_FRONT_AND_BACK GL_SHININESS 100.0 glMaterialf
18 GL_FRONT_AND_BACK GL_SPECULAR glColorMaterial
19 GL_FRONT_AND_BACK GL_AMBIENT_AND_DIFFUSE glColorMaterial
20 0.6 0.5 0.5 1.0 glColor4f
23 M: bunny-fixed-pipeline dispose