Framebuffer status handling

Remove Framebuffer::statusCode() and Framebuffer::statusMessage().
Introduce Framebuffer:getStatus() returning the value of
glCheckFramebufferStatus().

Test if creation was successful in w_newFramebuffer(L), on failure throw
useful error message.
This commit is contained in:
vrld
2010-08-25 17:28:51 +02:00
parent ce0006d04c
commit f97d087158
3 changed files with 19 additions and 38 deletions
+1 -4
View File
@@ -20,9 +20,7 @@ namespace opengl
Framebuffer(int width, int height);
virtual ~Framebuffer();
// for internal use (w_newFramebuffer <-> love.graphics.newFramebuffer) only
GLenum statusCode() const { return status_; } //SERIOUS DISLIKE HERE
const char* statusMessage() const;
unsigned int getStatus() const { return status_; }
bool grab();
bool stop();
@@ -41,7 +39,6 @@ namespace opengl
vertex vertices[4];
GLenum status_;
static std::map<GLenum, const char*> status_to_string;
};
} // opengl