- split shadowmap AABB tree into two parts. one for static and one for dynamic

- upload only the dynamic AABB subtree using glBufferSubData
- change internal raytracing stack limit from 16 to 32
- update shadowmap AABB tree after R_SetupFrame for proper frame interpolation
This commit is contained in:
Magnus Norddahl 2019-01-04 15:51:59 +01:00
commit f10ded756e
9 changed files with 121 additions and 56 deletions

View file

@ -65,7 +65,7 @@ void GLBuffer::Bind()
}
void GLBuffer::SetData(size_t size, void *data, bool staticdata)
void GLBuffer::SetData(size_t size, const void *data, bool staticdata)
{
assert(nomap); // once it's mappable, it cannot be recreated anymore.
Bind();
@ -92,6 +92,12 @@ void GLBuffer::SetData(size_t size, void *data, bool staticdata)
InvalidateBufferState();
}
void GLBuffer::SetSubData(size_t offset, size_t size, const void *data)
{
Bind();
glBufferSubData(mUseType, offset, size, data);
}
void GLBuffer::Map()
{
assert(nomap == false); // do not allow mapping of static buffers. Vulkan cannot do that so it should be blocked in OpenGL, too.