Added MaxVisibleVertices to debug display
Show how many of the maximum amount of vertices are actually being drawn (which only happens when they're visible)
This commit is contained in:
parent
0fb05ba815
commit
eca6a70ed6
|
@ -937,6 +937,8 @@
|
|||
#End Region
|
||||
|
||||
Public Overrides Sub Draw()
|
||||
DebugDisplay.MaxVertices = 0
|
||||
DebugDisplay.MaxVisibleVertices = 0
|
||||
|
||||
Dim ForegroundEntities As New List(Of Entity)
|
||||
|
||||
|
@ -1024,6 +1026,9 @@ nextIndexBackground:
|
|||
GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Transparent)
|
||||
For i = 0 To ForegroundEntities.Count - 1
|
||||
ForegroundEntities(i).Render()
|
||||
If ForegroundEntities(i).Visible = True Then
|
||||
DebugDisplay.MaxVisibleVertices += ForegroundEntities(i).VertexCount
|
||||
End If
|
||||
DebugDisplay.MaxVertices += ForegroundEntities(i).VertexCount
|
||||
Next
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ Public Class DebugDisplay
|
|||
|
||||
Dim s As String = GameController.GAMENAME & " " & GameController.GAMEDEVELOPMENTSTAGE & " " & GameController.GAMEVERSION & " / FPS: " & Math.Round(Core.GameInstance.FPSMonitor.Value, 0) & isDebugString & Environment.NewLine &
|
||||
cameraInformation &
|
||||
"E: " & _drawnVertices.ToString() & "/" & _maxVertices.ToString() & Environment.NewLine &
|
||||
"E: " & _drawnVertices.ToString() & "/" & _maxVertices.ToString() & " (" & _maxVisibleVertices & ")" & Environment.NewLine &
|
||||
"C: " & _maxDistance.ToString() & " A: " & ActionscriptActive.ToString() &
|
||||
MapPath
|
||||
|
||||
|
@ -96,6 +96,7 @@ Public Class DebugDisplay
|
|||
'Values for tracking render data of the level.
|
||||
Private Shared _drawnVertices As Integer = 0
|
||||
Private Shared _maxVertices As Integer = 0
|
||||
Private Shared _maxVisibleVertices As Integer = 0
|
||||
Private Shared _maxDistance As Integer = 0
|
||||
|
||||
''' <summary>
|
||||
|
@ -110,6 +111,18 @@ Public Class DebugDisplay
|
|||
End Set
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' The maximum amount of visible vertices that are present in the current scene.
|
||||
''' </summary>
|
||||
Public Shared Property MaxVisibleVertices() As Integer
|
||||
Get
|
||||
Return _maxVisibleVertices
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
_maxVisibleVertices = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' The maximum amount of vertices that are present in the current scene.
|
||||
''' </summary>
|
||||
|
|
|
@ -849,6 +849,7 @@ Public Class Level
|
|||
|
||||
' Reset the Debug values:
|
||||
DebugDisplay.DrawnVertices = 0
|
||||
DebugDisplay.MaxVisibleVertices = 0
|
||||
DebugDisplay.MaxVertices = 0
|
||||
DebugDisplay.MaxDistance = 0
|
||||
|
||||
|
@ -870,6 +871,9 @@ Public Class Level
|
|||
For i = 0 To AllFloors.Count - 1
|
||||
If i <= AllFloors.Count - 1 Then
|
||||
AllFloors(i).Render()
|
||||
If AllFloors(i).Visible = True Then
|
||||
DebugDisplay.MaxVisibleVertices += AllFloors(i).VertexCount
|
||||
End If
|
||||
DebugDisplay.MaxVertices += AllFloors(i).VertexCount
|
||||
End If
|
||||
Next
|
||||
|
@ -878,6 +882,9 @@ Public Class Level
|
|||
For i = 0 To AllEntities.Count - 1
|
||||
If i <= AllEntities.Count - 1 Then
|
||||
AllEntities(i).Render()
|
||||
If AllEntities(i).Visible = True Then
|
||||
DebugDisplay.MaxVisibleVertices += AllEntities(i).VertexCount
|
||||
End If
|
||||
DebugDisplay.MaxVertices += AllEntities(i).VertexCount
|
||||
End If
|
||||
Next
|
||||
|
@ -1015,6 +1022,9 @@ Public Class Level
|
|||
If i <= Me.OffsetmapFloors.Count - 1 Then
|
||||
If Not Me.OffsetmapFloors(i) Is Nothing Then
|
||||
Me.OffsetmapFloors(i).Render()
|
||||
If OffsetmapFloors(i).Visible = True Then
|
||||
DebugDisplay.MaxVisibleVertices += OffsetmapFloors(i).VertexCount
|
||||
End If
|
||||
DebugDisplay.MaxVertices += Me.OffsetmapFloors(i).VertexCount
|
||||
End If
|
||||
End If
|
||||
|
@ -1024,6 +1034,9 @@ Public Class Level
|
|||
For i = 0 To Me.OffsetmapEntities.Count - 1
|
||||
If i <= Me.OffsetmapEntities.Count - 1 Then
|
||||
If Not Me.OffsetmapEntities(i) Is Nothing Then
|
||||
If OffsetmapEntities(i).Visible = True Then
|
||||
DebugDisplay.MaxVisibleVertices += OffsetmapEntities(i).VertexCount
|
||||
End If
|
||||
Me.OffsetmapEntities(i).Render()
|
||||
DebugDisplay.MaxVertices += Me.OffsetmapEntities(i).VertexCount
|
||||
End If
|
||||
|
|
Loading…
Reference in New Issue