3
0
Fork 0
forked from suyu/suyu

gl_resource_manager: Correct MakeStreamCopy

This commit is contained in:
Fernando Sahmkow 2019-06-25 17:32:04 -04:00
parent 58c8a44e7a
commit 36665ce0b2
2 changed files with 2 additions and 3 deletions

View file

@ -149,8 +149,7 @@ void OGLBuffer::Release() {
} }
void OGLBuffer::MakeStreamCopy(std::size_t buffer_size) { void OGLBuffer::MakeStreamCopy(std::size_t buffer_size) {
if (handle == 0 || buffer_size == 0) ASSERT_OR_EXECUTE((handle == 0 || buffer_size == 0), { return; });
return;
glNamedBufferData(handle, buffer_size, nullptr, GL_STREAM_COPY); glNamedBufferData(handle, buffer_size, nullptr, GL_STREAM_COPY);
} }

View file

@ -186,7 +186,7 @@ public:
/// Deletes the internal OpenGL resource /// Deletes the internal OpenGL resource
void Release(); void Release();
// Converts the buffer into a persistant storage buffer // Converts the buffer into a stream copy buffer with a fixed size
void MakeStreamCopy(std::size_t buffer_size); void MakeStreamCopy(std::size_t buffer_size);
GLuint handle = 0; GLuint handle = 0;