Fixed perfomance counter

* Added vert-count and draw call count
* extracted performance function to seperate header as inline functions
This commit is contained in:
2022-05-29 21:31:21 +02:00
parent 02727c74bb
commit d9f0f40ad9
4 changed files with 65 additions and 57 deletions

View File

@ -1,6 +1,6 @@
#include "Graphics/Renderable.h"
#include "AssetManager/ModelImporter.h"
#include "PerfCounter.h"
Renderable* Renderable::Load()
@ -47,6 +47,8 @@ void Renderable::Draw()
{
VAO.Bind();
elementBuffer.Bind(true);
ES->verts = meshes[0].vertices.size();
ES->DC++;
glDrawElements(GL_TRIANGLES, static_cast<unsigned int>(meshes[0].elements.size()), GL_UNSIGNED_INT, NULL);
VAO.Unbind();