TrisRendered()

Blitz3D Forums/Blitz3D Programming/TrisRendered()

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

Blitz does some culling of things that are definitely off-screen.

Whatever remains is sent to the graphics card for rendering. But some of this may still be off-screen.

So TrisRendered() can be larger than the actual number of triangles drawn.

If there is a single mesh then it either gets culled or not.
As a result TrisRendered() will report nothing or everything.
Graphics3D 640, 480, 0, 1
WireFrame True

sph = CreateSphere(10)

cam = CreateCamera() : PositionEntity cam, 0, 0, -20: CameraZoom cam, 15

While Not KeyDown(1)
	RenderWorld 
	Text 10,20, "Total triangles: " + CountTriangles( GetSurface(sph,1) )
	Text 10,40, "  Tris Rendered: " + TrisRendered()
	Flip
	TurnEntity cam, 0, 0.01, 0
Wend
End