Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/Graphic3d_ShaderAttribute.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Created on: 2016-02-19
0002 // Created by: Kirill Gavrilov
0003 // Copyright (c) 2016 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _Graphic3d_ShaderAttribute_HeaderFile
0017 #define _Graphic3d_ShaderAttribute_HeaderFile
0018 
0019 #include <Standard_Transient.hxx>
0020 #include <NCollection_DefineAlloc.hxx>
0021 #include <TCollection_AsciiString.hxx>
0022 
0023 //! Describes custom vertex shader attribute.
0024 class Graphic3d_ShaderAttribute : public Standard_Transient
0025 {
0026 public:
0027 
0028   //! Creates new attribute.
0029   Standard_EXPORT Graphic3d_ShaderAttribute (const TCollection_AsciiString& theName,
0030                                              const int theLocation);
0031 
0032   //! Destructor.
0033   Standard_EXPORT virtual ~Graphic3d_ShaderAttribute();
0034 
0035   //! Returns name of shader variable.
0036   const TCollection_AsciiString& Name() const
0037   {
0038     return myName;
0039   }
0040 
0041   //! Returns attribute location to be bound on GLSL program linkage stage.
0042   int Location() const
0043   {
0044     return myLocation;
0045   }
0046 
0047 protected:
0048 
0049   TCollection_AsciiString myName;     //!< attribute name
0050   int                     myLocation; //!< attribute location
0051 
0052 public:
0053 
0054   DEFINE_STANDARD_RTTIEXT(Graphic3d_ShaderAttribute,Standard_Transient)
0055 
0056 };
0057 
0058 DEFINE_STANDARD_HANDLE (Graphic3d_ShaderAttribute, Standard_Transient)
0059 
0060 #endif // _Graphic3d_ShaderAttribute_HeaderFile