<CsoundSynthesizer>
<CsOptions>

-+Y ;*** no audio

</CsOptions>
<CsInstruments>

	sr = 100
	kr = 100
	ksmps = 1
	nchnls = 1
giFPS	init	40
	GLfps	giFPS
	GLpanel	"OpenGL panel", 512, 512
	GLpanel_end
	FLrun

#include "OpenGL.h"

gi1	ftgen	1,0,256,19,1,1,0,1

gi10	ftgen	10,0,256,10,1

	glMatrixMode	$GL_PROJECTION 
	glLoadIdentity
	gluPerspective	90,.01,10
	glMatrixMode	$GL_MODELVIEW 
	glLoadIdentity
	glClearColor	0,0,0,1

	glEnable	$GL_DEPTH_TEST	
	glEnable	$GL_CULL_FACE	
	glEnable	$GL_LIGHTING
	glEnable	$GL_LIGHT0
	glEnable	$GL_COLOR_MATERIAL

	
	glMaterial $GL_SPECULAR, .8,.8,0,1
	GLshininess 19
;	glShadeModel $GL_FLAT
	glColor3	0,0,1
	
GLinsert_i $GL_NOT_VALID
	glClear	$GL_COLOR_BUFFER_BIT + $GL_DEPTH_BUFFER_BIT 

GLinsert_i 1


;///////////////////////////////////////////////////
	instr	1
;///////////////////////////////////////////////////
;t3 init 1
;tmode =	(t3 > 0) ? $GL_FLAT : $GL_SMOOTH

t1	GLoscili	1,giFPS/.05,gi1,.75
t2	GLoscili	1,giFPS/.023456,gi1
t3	GLoscili	1,giFPS/.093215,gi10

	glLoadIdentity
	

	glColor3	1,1,0
		glTranslate	0,0,-.5
	GLUTprints	"This is@a bitmap text@example@using GLUTprints@opcode", $GLUT_BITMAP_TIMES_ROMAN_24, -.1*t3,t1*.4-.2,0,0
	glLoadIdentity
	glTranslate	0,0,-2.5
	glPushMatrix
	glRotate		t1*360,1,1,0
	glRotate		t2*360,1,0,0

tmode	=	(t3 > 0) ? $GL_FLAT : $GL_SMOOTH
	glShadeModel tmode
	glColor3	0,0,1
	glutTorus	.5,  1,  10,   20, 1
	glPopMatrix

GLinsert	1.1
	
	endin



</CsInstruments>
<CsScore>

i1 0 3600 1

</CsScore>
</CsoundSynthesizer>

