summaryrefslogtreecommitdiff
path: root/indra/llrender/llvertexbuffer.cpp
diff options
context:
space:
mode:
authorGeenz <geenz@lindenlab.com>2022-10-05 09:48:18 -0700
committerGeenz <geenz@lindenlab.com>2022-10-05 09:48:18 -0700
commitbe1cdc1aaa67eca71fee8cbbc16b4c85bcbdb258 (patch)
tree42bf8c3d8ff049c55b7609a934ef35fc3aac8616 /indra/llrender/llvertexbuffer.cpp
parent1a437cbedf94de90d749f426dde09f2466693de2 (diff)
Initial pass at adding KHR_debug support
This still needs some work - I'm not super satisfied with the overall structure of the code. Will continue to iterate as I add in proper RenderDoc support.
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
-rw-r--r--indra/llrender/llvertexbuffer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 981175d845..4ce04c17f6 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -175,7 +175,7 @@ U8* LLVBOPool::allocate(U32& name, U32 size, bool for_seed)
{
//make a new buffer
name = genBuffer();
-
+
glBindBuffer(mType, name);
if (!for_seed && i < LL_VBO_POOL_SEED_COUNT)
@@ -574,6 +574,10 @@ void LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_of
}
}
+void LLVertexBuffer::setLabel(std::string label) {
+ LL_LABEL_OBJECT_GL(GL_BUFFER, mGLBuffer, label.length(), label.c_str());
+}
+
void LLVertexBuffer::drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indices_offset) const
{
validateRange(start, end, count, indices_offset);
@@ -1068,6 +1072,7 @@ bool LLVertexBuffer::createGLBuffer(U32 size)
{
static int gl_buffer_idx = 0;
mGLBuffer = ++gl_buffer_idx;
+
mMappedData = (U8*)ll_aligned_malloc_16(size);
mSize = size;
}