00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2020 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : P. ESTRADE (Nov 1999) 00022 **=======================================================================*/ 00023 00024 #ifndef _SO_GL_PATTERN_ELEMENT_ 00025 #define _SO_GL_PATTERN_ELEMENT_ 00026 00027 #include <Inventor/sys/port.h> 00028 #include <Inventor/elements/SoPatternElement.h> 00029 #include <SoDeprecationRules.h> 00043 SoEXTENDER_Documented class SoDEPRECATED SoGLPatternElement : public SoPatternElement 00044 { 00045 SO_ELEMENT_HEADER( SoGLPatternElement ); 00046 00047 public: 00052 virtual void push( SoState* state); 00053 00057 virtual void pop(SoState* state, const SoElement* prevTopElement); 00058 00059 private: 00060 00062 virtual void init(SoState* state); 00063 00064 private: 00065 // Initializes the SoGLPatternElement class 00066 static void initClass() ; 00067 static void exitClass() ; 00068 00069 // typedef void (*GlPolygonOffsetPtr)(GLfloat factor, GLfloat units) 00070 00071 private: 00072 // Sets the pattern attributes in an instance. Has GL side effects. 00073 virtual void setElt( SbString category, SbString name, unsigned char* pattern ); 00074 virtual ~SoGLPatternElement(); 00075 00076 // static GLPatternPtr m_glPatternPtr; 00077 00078 private: 00079 // We save the state to figure out if the hints were 00080 // copied from a parent element; if they were, then caches will have 00081 // to depend on that element because if it changes we have to have 00082 // a chance to change our decision about what GL calls to make. 00083 // If this is NULL, then there are no cache dependencies. 00084 SoState *copiedFromParent ; 00085 00086 // To know if stipple is activated. 00087 SbBool m_isStippleOn; 00088 }; 00089 #endif // SO_GL_PATTERN_ELEMENT_ 00090 00091 00092