1 // Created by: NW,JPB,CAL
2 // Copyright (c) 1991-1999 Matra Datavision
3 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _Graphic3d_AspectLine3d_HeaderFile
17 #define _Graphic3d_AspectLine3d_HeaderFile
19 #include <Standard.hxx>
20 #include <Standard_Type.hxx>
22 #include <Graphic3d_ShaderProgram.hxx>
23 #include <Aspect_AspectLine.hxx>
24 #include <Aspect_TypeOfLine.hxx>
25 #include <Standard_Real.hxx>
29 class Graphic3d_AspectLine3d;
30 DEFINE_STANDARD_HANDLE(Graphic3d_AspectLine3d, Aspect_AspectLine)
32 //! Creates and updates a group of attributes
33 //! for 3d line primitives. This group contains the
34 //! colour, the type of line, and its thickness.
35 class Graphic3d_AspectLine3d : public Aspect_AspectLine
41 //! Creates a context table for line primitives
42 //! defined with the following default values:
44 //! Colour : NOC_YELLOW
45 //! Line type : TOL_SOLID
47 Standard_EXPORT Graphic3d_AspectLine3d();
49 //! Creates a context table for line primitives
50 //! defined with the specified values.
51 //! Warning: <AWidth> is the "linewidth scale factor".
52 //! The nominal line width is 1 pixel. The width of
53 //! the line is determined by applying the linewidth scale
54 //! factor to this nominal line width.
55 //! The supported linewidths vary by 1-pixel units.
56 Standard_EXPORT Graphic3d_AspectLine3d(const Quantity_Color& AColor, const Aspect_TypeOfLine AType, const Standard_Real AWidth);
58 //! Sets up OpenGL/GLSL shader program.
59 Standard_EXPORT void SetShaderProgram (const Handle(Graphic3d_ShaderProgram)& theProgram);
61 Standard_EXPORT const Handle(Graphic3d_ShaderProgram)& ShaderProgram() const;
66 DEFINE_STANDARD_RTTIEXT(Graphic3d_AspectLine3d,Aspect_AspectLine)
76 Handle(Graphic3d_ShaderProgram) MyShaderProgram;
87 #endif // _Graphic3d_AspectLine3d_HeaderFile