|
Post by PeterMaria on Dec 24, 2015 12:17:57 GMT -5
Hello, textmode(text_overlaid) glMatrixMode (GL_PROJECTION) glLoadIdentity() glOrtho (0,windowwidth(),windowheight(),0,-1,1) glMatrixMode (GL_MODELVIEW) glDisable (GL_DEPTH_TEST) glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) glEnable (GL_POLYGON_SMOOTH) dim u = loadtex("gl4font05.png") font(u) sub FillCircle(cx#, cy#, r#) glEnable(GL_BLEND) dim theta# = 2*3.1415926 dim c# = cosd(theta#) dim s# = sind(theta#) dim x# = r#, y# = 0 dim t#, i glBegin(GL_POLYGON) for i=0 to 360 step 6 glVertex2f(x# + cx#, y# + cy#) t# = x# x# = c# * x# - s# * y# y# = s# * t# + c# * y# next glEnd() glDisable(GL_BLEND) end sub
Sub DrawCenter(x#, y#) dim sx# = x#-40 dim sy# = y#-40 fillcircle(sx#, sy#, 40) End Sub
dim i#, a#, x#, y#
while scankeydown(27)=0 glclearcolor(1,1,1,1) glclear(gl_color_buffer_bit) for i#=1 to 6.4 step .1 x# = sin(i#) * 100 + 200 y# = cos(i#) * 100 + 200 glcolor4ub(i#*70%255,i#*60%255,i#*50%255,200) DrawCenter(x#+160+sin(a#*i#)*70,y#+60+cos(a#*i#)*50) next
a# = a#+.01 if a# >=360 then a# =-a#: end if locate 15,0 print "DO NOT CRY!" drawtext() swapbuffers() waittimer(10) wend
Attachments:gl4font05.zip (3.72 KB)
|
|
|
Post by matthew on Dec 26, 2015 11:04:27 GMT -5
I found it strangely hypnotic to watch. :-D
|
|