MVE - Multi-View Environment mve-devel
Loading...
Searching...
No Matches
check_gl_error.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015, Simon Fuhrmann
3 * TU Darmstadt - Graphics, Capture and Massively Parallel Computing
4 * All rights reserved.
5 *
6 * This software may be modified and distributed under the terms
7 * of the BSD 3-Clause license. See the LICENSE.txt file for details.
8 */
9
10#ifndef OGL_CHECK_GL_ERROR_HEADER
11#define OGL_CHECK_GL_ERROR_HEADER
12
13#include <stdexcept>
14
15#include "ogl/defines.h"
16#include "ogl/opengl.h"
17#include "util/strings.h"
18
20
21inline void
23{
24 GLenum err = glGetError();
25 if (err != GL_NO_ERROR)
26 throw std::runtime_error("GL error: " + util::string::get(err));
27}
28
30
31#endif
void check_gl_error()
std::string get(T const &value)
From arbitrary types to string conversion.
Definition strings.h:108
#define OGL_NAMESPACE_END
Definition defines.h:14
#define OGL_NAMESPACE_BEGIN
Definition defines.h:13