#pragma region CPL License /* Nuclex Native Framework Copyright (C) 2002-2013 Nuclex Development Labs This library is free software; you can redistribute it and/or modify it under the terms of the IBM Common Public License as published by the IBM Corporation; either version 1.0 of the License, or (at your option) any later version. This library 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 IBM Common Public License for more details. You should have received a copy of the IBM Common Public License along with this library */ #pragma endregion // CPL License #ifndef NUCLEX_GRAPHICS_VERTEXELEMENT_H #define NUCLEX_GRAPHICS_VERTEXELEMENT_H #include "Config.h" #include "VertexElementType.h" #include namespace Nuclex { namespace Graphics { // ------------------------------------------------------------------------------------------- // /// Describes the data stored in one element of a vertex /// /// Vertices consist of multiple elements, like a position, texture coordinates /// and perhaps some blend weights typically. The vertex shader has to know what /// is what, so you have to describe your vertex structure to the underlying API /// through these elements. /// struct VertexElement { /// Initializes a new vertex element /// Semantic name of the element, eg. "POSITION" /// Data type the element has public: VertexElement(const std::string &semantic, VertexElementType::Enum type) : Semantic(semantic), Type(type) {} /// Semantic name of the vertex element public: std::string Semantic; /// Data type this vertex element uses public: VertexElementType::Enum Type; }; // ------------------------------------------------------------------------------------------- // }} // namespace Nuclex::Graphics #endif // NUCLEX_GRAPHICS_VERTEXELEMENT_H