-
-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
157 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#include "Debug.hpp" | ||
|
||
|
||
namespace libprojectM::Renderer { | ||
|
||
void check_gl_error(const char* file, int line) | ||
{ | ||
GLenum err(glGetError()); | ||
|
||
while (err != GL_NO_ERROR) | ||
{ | ||
std::string error; | ||
|
||
switch (err) | ||
{ | ||
case GL_INVALID_OPERATION: | ||
error = "INVALID_OPERATION"; | ||
break; | ||
case GL_INVALID_ENUM: | ||
error = "INVALID_ENUM"; | ||
break; | ||
case GL_INVALID_VALUE: | ||
error = "INVALID_VALUE"; | ||
break; | ||
case GL_OUT_OF_MEMORY: | ||
error = "OUT_OF_MEMORY"; | ||
break; | ||
case GL_INVALID_FRAMEBUFFER_OPERATION: | ||
error = "INVALID_FRAMEBUFFER_OPERATION"; | ||
break; | ||
} | ||
|
||
std::cerr << "GL_" << error.c_str() << " - " << file << ":" << line << std::endl; | ||
err = glGetError(); | ||
} | ||
} | ||
|
||
} // namespace libprojectM::Renderer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
#pragma once | ||
|
||
#include <iostream> | ||
#include <projectM-opengl.h> | ||
|
||
#define CHECK_GL_ERROR check_gl_error(__FILE__, __LINE__) | ||
|
||
|
||
namespace libprojectM::Renderer { | ||
|
||
void check_gl_error(const char* file, int line); | ||
|
||
} // namespace libprojectM::Renderer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#pragma once | ||
|
||
#include "Renderer/Debug.hpp" | ||
#include "Renderer/TextureSamplerDescriptor.hpp" | ||
|
||
#include <map> | ||
|
Oops, something went wrong.