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 : R. ALBOU (Feb 1998) 00022 **=======================================================================*/ 00023 00024 /* include files */ 00025 #ifndef _SO_GL_POLYGON_OFFSET_ELEMENT_ 00026 #define _SO_GL_POLYGON_OFFSET_ELEMENT_ 00027 00028 #include <Inventor/sys/port.h> 00029 #include <Inventor/elements/SoPolygonOffsetElement.h> 00030 #include <SoDeprecationRules.h> 00031 00046 SoEXTENDER_Documented class SoDEPRECATED SoGLPolygonOffsetElement : public SoPolygonOffsetElement 00047 { 00048 SO_ELEMENT_HEADER(SoGLPolygonOffsetElement) ; 00049 00050 public: 00055 virtual void push(SoState *state) ; 00056 00060 virtual void pop(SoState *state, const SoElement *prevTopElement) ; 00061 00062 private: 00063 00065 virtual void init(SoState *state); 00066 00067 private: 00068 // Initializes the SoGLPolygonOffsetElement class 00069 static void initClass() ; 00070 static void exitClass() ; 00071 00072 private: 00073 // Sets the polygon offset attributes in an instance. Has GL side effects. 00074 virtual void setElt(float factor, float units, Style styles, SbBool on) ; 00075 00076 virtual ~SoGLPolygonOffsetElement() ; 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 // Send polygon offset to GL 00087 void send() ; 00088 } ; 00089 00090 #endif /* _SO_GL_POLYGON_OFFSET_ELEMENT_ */ 00091 00092 00093