/* * ***** BEGIN GPL LICENSE BLOCK ***** * * 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 (at your option) 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, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * The Original Code is Copyright (C) Blender Foundation. * All rights reserved. * * The Original Code is: all of this file. * * Contributor(s): Lukas Toenne * * ***** END GPL LICENSE BLOCK ***** */ #ifndef __GLSL_TYPES_H__ #define __GLSL_TYPES_H__ /** \file blender/blenvm/glsl/glsl_types.h * \ingroup glsl */ #include "MEM_guardedalloc.h" #include "node_value.h" #include "typedesc.h" #include "util_string.h" namespace blenvm { /* expects a macro DO_BVM_TYPE that handles the individual types */ #define BVM_TYPE_SELECT(t) \ switch (t) { \ case BVM_FLOAT: BVM_DO_TYPE(BVM_FLOAT); break; \ case BVM_FLOAT3: BVM_DO_TYPE(BVM_FLOAT3); break; \ case BVM_FLOAT4: BVM_DO_TYPE(BVM_FLOAT4); break; \ case BVM_INT: BVM_DO_TYPE(BVM_INT); break; \ case BVM_MATRIX44: BVM_DO_TYPE(BVM_MATRIX44); break; \ case BVM_STRING: BVM_DO_TYPE(BVM_STRING); break; \ case BVM_RNAPOINTER: BVM_DO_TYPE(BVM_RNAPOINTER); break; \ case BVM_MESH: BVM_DO_TYPE(BVM_MESH); break; \ case BVM_DUPLIS: BVM_DO_TYPE(BVM_DUPLIS); break; \ } (void)0 #if 0 /* template-based version of the BVM_TYPE_SELECT macro */ template