diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2019-04-30 13:12:35 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2019-04-30 13:12:35 +0200 |
commit | 868ba6279a20e4d1412c2d576c67400167de6694 (patch) | |
tree | a7090b2da96987c4c532c5bedf812df20f604964 /src/RendererSection.cpp | |
parent | Second iteration of changing to single-threaded model (diff) | |
download | AltCraft-868ba6279a20e4d1412c2d576c67400167de6694.tar AltCraft-868ba6279a20e4d1412c2d576c67400167de6694.tar.gz AltCraft-868ba6279a20e4d1412c2d576c67400167de6694.tar.bz2 AltCraft-868ba6279a20e4d1412c2d576c67400167de6694.tar.lz AltCraft-868ba6279a20e4d1412c2d576c67400167de6694.tar.xz AltCraft-868ba6279a20e4d1412c2d576c67400167de6694.tar.zst AltCraft-868ba6279a20e4d1412c2d576c67400167de6694.zip |
Diffstat (limited to 'src/RendererSection.cpp')
-rw-r--r-- | src/RendererSection.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/RendererSection.cpp b/src/RendererSection.cpp index 1521c6f..d797771 100644 --- a/src/RendererSection.cpp +++ b/src/RendererSection.cpp @@ -1,6 +1,7 @@ #include "RendererSection.hpp" #include <easylogging++.h> +#include <optick.h> #include "Utility.hpp" #include "Renderer.hpp" @@ -31,6 +32,7 @@ GLuint RendererSection::VboVertices = magicUniqueConstant; GLuint RendererSection::VboUvs = magicUniqueConstant; RendererSection::RendererSection(const RendererSectionData &data) { + OPTICK_EVENT(); if (VboVertices == magicUniqueConstant) { glGenBuffers(1, &VboVertices); glGenBuffers(1, &VboUvs); @@ -155,6 +157,7 @@ void swap(RendererSection & lhs, RendererSection & rhs) { } void RendererSection::Render(RenderState &renderState) { + OPTICK_EVENT(); renderState.SetActiveVao(Vao); glDrawArraysInstanced(GL_TRIANGLES, 0, 6, numOfFaces); glCheckError(); @@ -169,6 +172,7 @@ size_t RendererSection::GetHash() { } void RendererSection::UpdateData(const RendererSectionData & data) { + OPTICK_EVENT(); glBindBuffer(GL_ARRAY_BUFFER, Vbo[TEXTURES]); glBufferData(GL_ARRAY_BUFFER, data.textures.size() * sizeof(glm::vec4), data.textures.data(), GL_DYNAMIC_DRAW); |