Move SDLGLGraphicsContext.h to the correct location. Minor cleanup

This commit is contained in:
Henrik Rydgård committed 2018-02-04 13:42:04 +01:00
1 parent 99386da01e
commit 79d1610148
3 files changed
+5 -2

No files matched your search

File renamed without changes.
+1 -1
View File
@@ -54,7 +54,7 @@ GLRenderManager::GLRenderManager() {
GLRenderManager::~GLRenderManager() {
for (int i = 0; i < MAX_INFLIGHT_FRAMES; i++) {
// _assert_(frameData_[i].deleter.IsEmpty());
_assert_(frameData_[i].deleter.IsEmpty());
}
if (!useThread_) {
+4 -1
View File
@@ -153,9 +153,12 @@ class GLDeleter {
public:
void Perform();
bool IsEmpty() const {
return shaders.empty() && programs.empty() && buffers.empty() && textures.empty() && inputLayouts.empty() && framebuffers.empty();
}
void Take(GLDeleter &other) {
deleterMutex_.lock();
_assert_msg_(G3D, shaders.empty() && programs.empty() && buffers.empty() && textures.empty() && inputLayouts.empty() && framebuffers.empty(), "Deleter already has stuff");
_assert_msg_(G3D, IsEmpty(), "Deleter already has stuff");
shaders = std::move(other.shaders);
programs = std::move(other.programs);
buffers = std::move(other.buffers);