diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-04-08 01:21:55 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-04-08 01:21:55 +0300 |
commit | 8781220335a1f7b8b60122df13fedba23bef9b35 (patch) | |
tree | 89785ca78b67731683e76e4ad6de62078e54c74e /src/render/opengldebug.h | |
parent | cf24722d84c7e4fd1d32365d720c291a48b9f9c8 (diff) | |
download | mv-8781220335a1f7b8b60122df13fedba23bef9b35.tar.gz mv-8781220335a1f7b8b60122df13fedba23bef9b35.tar.bz2 mv-8781220335a1f7b8b60122df13fedba23bef9b35.tar.xz mv-8781220335a1f7b8b60122df13fedba23bef9b35.zip |
Add support for OpenGL extension GL_EXT_debug_marker.
Diffstat (limited to 'src/render/opengldebug.h')
-rw-r--r-- | src/render/opengldebug.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/render/opengldebug.h b/src/render/opengldebug.h new file mode 100644 index 000000000..82b151cc8 --- /dev/null +++ b/src/render/opengldebug.h @@ -0,0 +1,36 @@ +/* + * The ManaPlus Client + * Copyright (C) 2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef RENDER_OPENGLDEBUG_H +#define RENDER_OPENGLDEBUG_H + +#include "render/mgl.h" + +#if defined(DEBUG_OPENGL) && defined(USE_OPENGL) +#define GLDEBUG_START(text) if (mglPushGroupMarker) \ + mglPushGroupMarker(sizeof(text), text); +#define GLDEBUG_END() if (mglPopGroupMarker) \ + mglPopGroupMarker(); +#else +#define GLDEBUG_START(text) +#define GLDEBUG_END() +#endif + +#endif // RENDER_OPENGLDEBUG_H |