; ----------------------------------------- ; PRESS SPACE TO CHANGE TESTS ; ----------------------------------------- Fill_Method=0 Do Cls RGB(00,0,0) Select Fill_Method Case 0 Fill_Screen_FastDot(Fill_Colour) Case 1 Fill_Screen_FastDot2(Fill_Colour) Case 2 Fill_Screen_FastDot3(Fill_Colour) Case 3 Fill_Screen_FastDot4(Fill_Colour) EndSelect Fill_Colour+=GetScreenWidth() If SpaceKey() Fill_Method=(Fill_Method+1) And 3 FlushKeys EndIf Sync Loop Function Fill_Screen_FastDot(ThisColour) Width= GetScreenWidth()-1 LockBuffer ThisRgb=Point(0,0) For ylp= 0 To GetScreenHeight()-1 // Fill Strip of pixels manually For xlp= 0 To Width FastDot xlp,ylp,ThisColour Next ThisColour=ThisColour + Width Next UnLockBuffer PrintMethod("FastDOT") EndFunction Function Fill_Screen_FastDot2(ThisColour) Width= GetScreenWidth()-1 LockBuffer ThisRgb=Point(0,0) For ylp= 0 To GetScreenHeight()-1 // Fill Strip of pixels manually in pairs For xlp= 0 To Width Step 2 FastDot2 xlp,ylp,ThisColour,ThisColour Next ThisColour=ThisColour + Width Next UnLockBuffer PrintMethod("FastDOT2") EndFunction Function Fill_Screen_FastDot3(ThisColour) Width= GetScreenWidth()-1 LockBuffer ThisRgb=Point(0,0) For ylp= 0 To GetScreenHeight()-1 // Fill Strip of pixels manually in pairs For xlp= 0 To ((Width/3)*3)-1 Step 3 FastDot3 xlp,ylp,ThisColour,ThisColour,ThisColour Next // Fill Left Overs on this row For xlp= xlp To Width FastDot xlp,ylp,ThisColour Next ThisColour=ThisColour + Width Next UnLockBuffer PrintMethod("FastDOT3") EndFunction Function Fill_Screen_FastDot4(ThisColour) Width= GetScreenWidth()-1 LockBuffer ThisRgb=Point(0,0) For ylp= 0 To GetScreenHeight()-1 // Fill Strip of pixels manually in quads For xlp= 0 To Width Step 4 FastDot4 xlp,ylp,ThisColour,ThisColour,ThisColour,ThisColour Next ThisColour=ThisColour + Width Next UnLockBuffer PrintMethod("FastDOT4") EndFunction Function PrintMethod(Method$) Message$="Fill Screen("+Method$ Message$+=":" +Str$(FPS())+")" Message$+=" Press Space" Print Message$ EndFunction |