|
Post by PeterMaria on Dec 16, 2015 6:17:11 GMT -5
Hi, your screen resolution should be 1024x768
glmatrixmode(gl_projection) glloadidentity() glortho(0, windowwidth(), windowheight(), 0, 0, 1) gldisable(gl_depth_test) gldrawbuffer(gl_back) glmatrixmode(gl_modelview) glloadidentity() glenable(gl_point_smooth)
sub Ellipse(x#,y#,r1#,r2#,size#) dim t# dim ra# = r1#/2, rb# = r2#/2 glPointSize(size#) glBegin(GL_POINTS) for t#=0 to 360 glVertex2f(x#+cos(t#)*ra#, y#+sin(t#)*rb#) next glEnd() end sub dim a#,x#=windowwidth()/2,y#=windowheight()/2,r#=400,c#,lx#,ly#
while scankeydown(27)=0 glClearColor(0,0,0,1) glClear(GL_COLOR_BUFFER_BIT) for a#=0 to 360 step 10 glcolor3ub( a#-105, a#*.5, a#*.5) lx# = sind(a#)*c#+a# ly# = cosd(a#)*c#+a# Ellipse(x#+sind(c#)*80,y#+cosd(c#)*20,lx#,ly#,2) next c# = c#+2 if c#>=360 then c#=-c#: end if swapbuffers() waittimer(10) wend
|
|
|
Post by matthew on Dec 19, 2015 15:14:29 GMT -5
Looks a bit like a black hole in outer space, Peter. :-)
|
|