diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-05-11 18:04:01 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-05-12 03:00:10 +0200 |
commit | 5b7dfb07e3b167e8b6626f5d872abb8d3c8b5dd2 (patch) | |
tree | ef723c8040c1b9b3552b2d872156bc6f2993d3d2 /vcl | |
parent | ca4c75ae7c0326c86e79532649a6a8c1bcbd5ce4 (diff) |
move glm operator<< for debugging to OpenGLHelper
Change-Id: Ia529badffe08507d593f494230d2e504b68ff477
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/opengl/OpenGLHelper.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx index 4ef2ce0e62d7..0e9d7107988d 100644 --- a/vcl/source/opengl/OpenGLHelper.cxx +++ b/vcl/source/opengl/OpenGLHelper.cxx @@ -247,4 +247,26 @@ const char* OpenGLHelper::GLErrorString(GLenum errorCode) return NULL; } +std::ostream& operator<<(std::ostream& rStrm, const glm::vec4& rPos) +{ + rStrm << "( " << rPos[0] << ", " << rPos[1] << ", " << rPos[2] << ", " << rPos[3] << ")"; + return rStrm; +} + +std::ostream& operator<<(std::ostream& rStrm, const glm::mat4& rMatrix) +{ + for(int i = 0; i < 4; ++i) + { + rStrm << "\n( "; + for(int j = 0; j < 4; ++j) + { + rStrm << rMatrix[j][i]; + rStrm << " "; + } + rStrm << ")\n"; + } + return rStrm; +} + + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |