From d9be27bba8941260500066cdd43ebb016356bc67 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 12 Jul 2014 21:35:44 +0300 Subject: Add macro for checking OpenGL function is it null or not null. --- src/render/mglcheck.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/render/mglcheck.h (limited to 'src/render/mglcheck.h') diff --git a/src/render/mglcheck.h b/src/render/mglcheck.h new file mode 100644 index 000000000..8355d8ab9 --- /dev/null +++ b/src/render/mglcheck.h @@ -0,0 +1,31 @@ +/* + * The ManaPlus Client + * Copyright (C) 2012-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 . + */ + +#ifndef RENDER_MGLCHECK_H +#define RENDER_MGLCHECK_H + +#include "main.h" +#ifdef USE_OPENGL + +#define isGLNull(func) (!(func)) +#define isGLNotNull(func) ((func) != nullptr) + +#endif // USE_OPENGL +#endif // RENDER_MGLCHECK_H -- cgit v1.2.3-60-g2f50