Skip to content
Snippets Groups Projects
Commit 40c8058c authored by Pascal Engeler's avatar Pascal Engeler
Browse files

Made print statements debug only

parent 7a9f89e8
No related branches found
No related tags found
No related merge requests found
...@@ -151,8 +151,10 @@ int Layer::selectObject(unsigned x, unsigned y, glm::mat4 projection, glm::mat4 ...@@ -151,8 +151,10 @@ int Layer::selectObject(unsigned x, unsigned y, glm::mat4 projection, glm::mat4
auto color = _framebuffer.getPixel(x, y); auto color = _framebuffer.getPixel(x, y);
#ifndef NDEBUG
std::cout << "color float: (" << color[0] << ", " << color[1] << ", " << color[2] << ", " << color[3] << ")" << std::endl; std::cout << "color float: (" << color[0] << ", " << color[1] << ", " << color[2] << ", " << color[3] << ")" << std::endl;
std::cout << "color int: (" << color[0]*255 << ", " << color[1]*255 << ", " << color[2]*255 << ", " << color[3]*255 << ")" << std::endl; std::cout << "color int: (" << color[0]*255 << ", " << color[1]*255 << ", " << color[2]*255 << ", " << color[3]*255 << ")" << std::endl;
#endif
_framebuffer.unbind(); _framebuffer.unbind();
...@@ -163,7 +165,9 @@ int Layer::selectObject(unsigned x, unsigned y, glm::mat4 projection, glm::mat4 ...@@ -163,7 +165,9 @@ int Layer::selectObject(unsigned x, unsigned y, glm::mat4 projection, glm::mat4
int index = -1; int index = -1;
try { try {
int color_function = int(((color[0] + 2560 * color[1]) * 255.f) + 0.2); int color_function = int(((color[0] + 2560 * color[1]) * 255.f) + 0.2);
#ifndef NDEBUG
std::cout << "color function: " << color_function << std::endl; std::cout << "color function: " << color_function << std::endl;
#endif
index = _colorToObjectIndex[color_function]; index = _colorToObjectIndex[color_function];
} }
catch(...) { catch(...) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment