<CsoundSynthesizer>
<CsOptions>

-+Y ;*** no audio

</CsOptions>
<CsInstruments>

;** More instances of the same instr access the OpenGL routine chain

	sr = 100
	kr = 100
	ksmps = 1
	nchnls = 1

	GLfps	30
	GLpanel	"OpenGL panel", 512, 512
	GLpanel_end
	FLrun

#include "OpenGL.h"

gi1	ftgen	1,0,256,19,1,1,0,1

	glClearColor	0,0,.2,1
	glEnable	$GL_LIGHTING
	glEnable	$GL_LIGHT0
	glEnable	$GL_DEPTH_TEST
	glEnable	$GL_COLOR_MATERIAL
GLinsert_i $GL_NOT_VALID
	glClear	$GL_COLOR_BUFFER_BIT + $GL_DEPTH_BUFFER_BIT 

GLinsert_i 1


;///////////////////////////////////////////////////
	instr	1
;///////////////////////////////////////////////////


k1	oscili	1,.05,1,.75
k2	oscili	1,.023456,1
k3	oscili	1,.043215,1
	glLineWidth 	k1*5 + 1
	glMatrixMode	$GL_PROJECTION
	glLoadIdentity
	gluPerspective	200*k3,.1,10
	glMatrixMode	$GL_MODELVIEW 
	glLoadIdentity
	glTranslate	0,0,-2.5
	glPushMatrix
	glRotate		k2*360,0,0,1
	glColor		k1,k2,1-k1,0
	glutCube 		k1*2,0
	glPopMatrix

GLinsert	1.1
	endin



</CsInstruments>
<CsScore>

i1 0 3600 1
i1 6.123 3600 1.505
i1 11.321 3600 [1.5 * (2^(1/12))]
i1 13.321 3600 [(2^(1/12))]


</CsScore>
</CsoundSynthesizer>
