Surface Benchmarking

Blitz3D Forums/Blitz3D Programming/Surface Benchmarking

After reading the surface count thread I went and attempted to make a benchmark. I have it rendering 225 spheres each with 8 segments or 224 polygons. All together it's 50,400 polygons. My machine (Athlon 1GHz, GeForce 3 Ti 200, 512 MB RAM) runs this at 121 FPS whether AddMesh() and Freeentity(sphere) are commented out or not. So I don't know if that means all these spheres use the same surface since there are no textures and they're materials are the same or that surface count doesn't matter. Draw your own conclusions.

Oh and the camera is positioned pretty high which would rule out fill rate issues.

screen_width=640
screen_height=480
Graphics3D(screen_width,screen_height,16,1)

camera=CreateCamera()
PositionEntity(camera,75,400,75)
RotateEntity(camera,90,0,0)

mesh=CreateMesh()

For i=1 To 150 Step 10
	For j=1 To 150 Step 10
		sphere=CreateSphere(8)
		PositionMesh(sphere,i,0,j)
		AddMesh(sphere,mesh)
		FreeEntity(sphere)
	Next
Next

While KeyDown(1)=0
	RenderWorld
	Gosub Framerate
	Flip
Wend

;====== FRAMERATE ========================================================
.Framerate
fps_counter=fps_counter+1
If framecounter_time=0 Then framecounter_time=MilliSecs()
If framecounter_time+1001<MilliSecs()
	framerate=fps_counter
	machine_framerate=framerate
	fps_counter=0
	framecounter_time=MilliSecs()
	last_framerate=framerate
EndIf
Text ((screen_width*280)/640),((screen_height*430)/480),"Polygons "+TrisRendered()
Text ((screen_width*280)/640),((screen_height*450)/480),"FPS-- "+framerate
Return
;=========================================================================