1 #ifndef COIN_SOGLLAZYELEMENT_H 
    2 #define COIN_SOGLLAZYELEMENT_H 
   27 #include <Inventor/elements/SoLazyElement.h> 
   28 #include <Inventor/C/glue/gl.h> 
   31 class SoGLLazyElementP;
 
   49   static void sendAllMaterial(
SoState * state);
 
   50   static void sendNoMaterial(
SoState * state);
 
   51   static void sendOnlyDiffuseColor(
SoState * state);
 
   52   static void sendLightModel(
SoState * state, 
const int32_t model);
 
   53   static void sendPackedDiffuse(
SoState * state, 
const uint32_t diffuse);
 
   54   static void sendFlatshading(
SoState * state, 
const SbBool onoff);
 
   55   static void sendVertexOrdering(
SoState * state, 
const VertexOrdering ordering);
 
   56   static void sendTwosideLighting(
SoState * state, 
const SbBool onoff);
 
   57   static void sendBackfaceCulling(
SoState * state, 
const SbBool onoff);
 
   59   void sendDiffuseByIndex(
const int index) 
const;
 
   60   static SbBool isColorIndex(
SoState *state);
 
   62   void send(
const SoState *state, uint32_t mask) 
const;
 
   64   void sendVPPacked(
SoState* state, 
const unsigned char* pcolor);
 
   66   void reset(
SoState* state, uint32_t bitmask) 
const;
 
   68   typedef struct COIN_DLL_API {
 
   69     uint32_t cachebitmask;
 
   77     int32_t blend_sfactor;
 
   78     int32_t blend_dfactor;
 
   79     int32_t alpha_blend_sfactor;
 
   80     int32_t alpha_blend_dfactor;
 
   82     int32_t vertexordering;
 
   88     uint32_t diffusenodeid;
 
   89     uint32_t transpnodeid;
 
   93   virtual void setDiffuseElt(
SoNode*,  int32_t numcolors,
 
   94                              const SbColor * colors, SoColorPacker * packer);
 
   95   virtual void setPackedElt(
SoNode * node, int32_t numcolors,
 
   96                             const uint32_t * colors, 
const SbBool packedtransparency);
 
   97   virtual void setColorIndexElt(
SoNode * node, int32_t numindices,
 
   98                                 const int32_t * indices);
 
   99   virtual void setTranspElt(
SoNode * node, int32_t numtransp,
 
  100                             const float * transp, SoColorPacker * packer);
 
  102   virtual void setTranspTypeElt(int32_t type);
 
  103   virtual void setAmbientElt(
const SbColor* color);
 
  104   virtual void setEmissiveElt(
const SbColor* color);
 
  105   virtual void setSpecularElt(
const SbColor* color);
 
  106   virtual void setShininessElt(
float value);
 
  107   virtual void setColorMaterialElt(SbBool value);
 
  108   virtual void enableBlendingElt(
int sfactor, 
int dfactor, 
int alpha_sfactor, 
int alpha_dfactor);
 
  109   virtual void disableBlendingElt(
void);
 
  110   virtual void setLightModelElt(
SoState *state, int32_t model);
 
  111   virtual void setMaterialElt(
SoNode * node, uint32_t bitmask,
 
  112                               SoColorPacker * packer,
 
  113                               const SbColor * diffuse, 
const int numdiffuse,
 
  114                               const float * transp, 
const int numtransp,
 
  118                               const float shininess,
 
  119                               const SbBool istransparent);
 
  120   virtual void setVertexOrderingElt(VertexOrdering ordering);
 
  121   virtual void setBackfaceCullingElt(SbBool onoff);
 
  122   virtual void setTwosideLightingElt(SbBool onoff);
 
  123   virtual void setShadeModelElt(SbBool flatshading);
 
  124   virtual void setGLImageIdElt(uint32_t glimageid, SbBool alphatest);
 
  125   virtual void setAlphaTestElt(SbBool onoff);
 
  127   static void beginCaching(
SoState * state,
 
  128                            SoGLLazyElement::GLState * prestate,
 
  129                            SoGLLazyElement::GLState * poststate);
 
  130   static void endCaching(
SoState * state);
 
  132   static SbBool preCacheCall(
SoState * state, SoGLLazyElement::GLState * prestate);
 
  133   static void postCacheCall(
SoState * state, SoGLLazyElement::GLState * poststate);
 
  135   static void mergeCacheInfo(
SoState * state,
 
  136                              SoGLLazyElement::GLState * childprestate,
 
  137                              SoGLLazyElement::GLState * childpoststate);
 
  139   void updateColorVBO(SoVBO * vbo);
 
  142   virtual void lazyDidSet(uint32_t mask);
 
  143   virtual void lazyDidntSet(uint32_t mask);
 
  146   void sendPackedDiffuse(
const uint32_t diffuse) 
const;
 
  147   void sendAmbient(
const SbColor & color) 
const;
 
  148   void sendEmissive(
const SbColor & color) 
const;
 
  149   void sendSpecular(
const SbColor & specular) 
const;
 
  150   void sendShininess(
const float shininess) 
const;
 
  151   void sendTransparency(
const int stipplenum) 
const;
 
  152   void enableBlending(
const int sfactor, 
const int dfactor) 
const;
 
  153   void enableSeparateBlending(
const cc_glglue * glue,
 
  154                               const int sfactor, 
const int dfactor,
 
  155                               const int alpha_sfactor, 
const int alpha_dfactor) 
const;
 
  156   void disableBlending(
void) 
const;
 
  158   void sendLightModel(
const int32_t model) 
const;
 
  159   void sendFlatshading(
const SbBool onoff) 
const;
 
  160   void sendVertexOrdering(
const VertexOrdering ordering) 
const;
 
  161   void sendTwosideLighting(
const SbBool onoff) 
const;
 
  162   void sendBackfaceCulling(
const SbBool onoff) 
const;
 
  163   void sendGLImage(
const uint32_t glimageid) 
const;
 
  164   void sendAlphaTest(
const SbBool onoff) 
const;
 
  166   void packColors(SoColorPacker * packer) 
const;
 
  168   uint32_t didsetbitmask;
 
  169   uint32_t didntsetbitmask;
 
  170   uint32_t cachebitmask;
 
  171   uint32_t opencacheflags;
 
  174   GLState * postcachestate;
 
  175   GLState * precachestate;
 
  177   SoColorPacker * colorpacker;
 
  178   const uint32_t * packedpointer;
 
  181   SoGLLazyElementP * pimpl; 
 
  184 #endif // !COIN_SOGLLAZYELEMENT_H 
The SbColor class contains the red, green and blue components which make up a color value...
Definition: SbColor.h:30
The SoNode class is the base class for nodes used in scene graphs.Coin is a retained mode 3D visualiz...
Definition: SoNode.h:47
SoElement is the abstract base class for all elements. 
Definition: SoElement.h:34
virtual void push(SoState *state)
Definition: SoLazyElement.cpp:188
The SoState class manages the Coin scenegraph traversal state data.The SoState class is used by actio...
Definition: SoState.h:35
The SoGLLazyElement class is meant to optimize GL rendering.This is just a wrap-around implementation...
Definition: SoGLLazyElement.h:34
static void initClass()
Definition: SoLazyElement.cpp:123
virtual void init(SoState *state)
Definition: SoLazyElement.cpp:152
The SoLazyElement class is used to handle material and shape properties.So[GL]LazyElement is...
Definition: SoLazyElement.h:40
The SoGLRenderCache class is used to cache OpenGL calls. 
Definition: SoGLRenderCache.h:34
virtual void pop(SoState *state, const SoElement *prevTopElement)
Definition: SoElement.cpp:585