|
|
|||
File indexing completed on 2026-09-12 09:18:22
0001 // Created on: 2011-09-20 0002 // Created by: Sergey ZERCHANINOV 0003 // Copyright (c) 2011-2014 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 OpenGl_LineAttributes_HeaderFile 0017 #define OpenGl_LineAttributes_HeaderFile 0018 0019 #include <OpenGl_Resource.hxx> 0020 0021 #include <Graphic3d_HatchStyle.hxx> 0022 #include <NCollection_DataMap.hxx> 0023 0024 class OpenGl_Context; 0025 0026 //! Utility class to manage OpenGL resources of polygon hatching styles. 0027 //! @note the implementation is not supported by Core Profile and by ES version. 0028 class OpenGl_LineAttributes : public OpenGl_Resource 0029 { 0030 DEFINE_STANDARD_RTTIEXT(OpenGl_LineAttributes, OpenGl_Resource) 0031 public: 0032 //! Default constructor. 0033 Standard_EXPORT OpenGl_LineAttributes(); 0034 0035 //! Default destructor. 0036 Standard_EXPORT ~OpenGl_LineAttributes() override; 0037 0038 //! Release GL resources. 0039 Standard_EXPORT void Release(OpenGl_Context* theGlCtx) override; 0040 0041 //! Returns estimated GPU memory usage - not implemented. 0042 size_t EstimatedDataSize() const override { return 0; } 0043 0044 //! Sets type of the hatch. 0045 Standard_EXPORT bool SetTypeOfHatch(const OpenGl_Context* theGlCtx, 0046 const occ::handle<Graphic3d_HatchStyle>& theStyle); 0047 0048 private: 0049 unsigned int init(const OpenGl_Context* theGlCtx, 0050 const occ::handle<Graphic3d_HatchStyle>& theStyle); 0051 0052 protected: 0053 NCollection_DataMap<occ::handle<Graphic3d_HatchStyle>, unsigned int> myStyles; //!< Hatch patterns 0054 }; 0055 0056 #endif // _OpenGl_LineAttributes_Header
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|