VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtIndirectOpenGLState.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2021 VT-MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
17 
19 
20 namespace makVrv
21 {
26  {
27  public:
29  DtIndirectOpenGLState(bool cullFaceEnabled
30  , bool blendingEnabled, bool alphaToCoverageEnabled
31  , const DtIndirectBlendFunction& blendFunction, const DtIndirectBlendEquation& blendEquation
32  , const DtIndirectPolygonOffset& polyOffset, GLenum primitiveType
33  , bool depthOnly);
34 
37 
40 
42  DtIndirectOpenGLState &operator=(const DtIndirectOpenGLState& other);
43 
46 
47  public:
49  virtual bool cullFaceEnabled(void) const;
51  virtual void setCullFaceEnabled(bool val);
53 
55  virtual void setPolygonOffset(const DtIndirectPolygonOffset& polyOffset);
57  virtual const DtIndirectPolygonOffset& polygonOffset(void) const;
59 
61  virtual bool blendingEnabled(void) const;
63  virtual void setBlendingEnabled(bool val);
65 
67  virtual bool alphaToCoverageEnabled(void) const;
69  virtual void setAlphaToCoverageEnabled(bool val);
71 
73  virtual void setBlendFunction(const DtIndirectBlendFunction& blendFunction);
75  virtual const DtIndirectBlendFunction& blendFunction(void) const;
77 
79  virtual void setBlendEquation(const DtIndirectBlendEquation& blendEquation);
81  virtual const DtIndirectBlendEquation& blendEquation(void) const;
83 
85  virtual void setDepthOnly(bool val);
87  virtual const bool depthOnly(void) const;
89 
92  virtual void apply() const;
93 
95  virtual const SetInts& modes(void) const;
96 
98  virtual const SetInts& attributes(void) const;
99 
103  virtual bool operator==(const DtIndirectOpenGLState& rhs) const;
104 
106  virtual bool operator!=(const DtIndirectOpenGLState& rhs) const;
107 
109  virtual GLenum primitiveType() const;
110 
111  public:
112 
113  //Sets up a DtIndirectOpenGLState object to use for light sources since it is constant and needs to match in a few places.
114  static DtIndirectOpenGLState lightSourceState();
115 
116  protected:
119 
122 
125 
128 
131 
134 
136 
137  // pseudo-state
138  // this isn't really a depth only bin, it just says, that transparent polygons
139  // are drawn with alpha testing off (alpha func set such that alpha testing is off)
140  // are drawn _after_ regular stuff and before the ocean, with
142 
145  };
146 
148  std::ostream& operator <<(std::ostream& o, const DtIndirectOpenGLState& stateset);
149 
152  {
153  size_t operator()(const DtIndirectOpenGLState& key) const;
154  };
155 
156 }
Contains the DtIndirectBlendEquation class declaration.
bool myDepthOnly
Definition: DtIndirectOpenGLState.h:141
std::set< int > SetInts
Definition: DtCommonTypes.h:22
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
non virtual Container class for holding on to the different states that are found for indirect geomet...
Definition: DtIndirectOpenGLState.h:25
size_t operator()(const DtIndirectOpenGLState &key) const
Contains the DtIndirectBlendFunction class declaration.
DT_DLL_VRFGUICORE makVrv::DtMessage & operator<<(DtMessage &msg, const makVrf::DtNetworkMessageAgentInterface &)
Hasher for the concurrent_unordered_map.
Definition: DtIndirectOpenGLState.h:151
bool myAlphaToCoverageEnabled
a2C enabled or not
Definition: DtIndirectOpenGLState.h:124
bool myBlendingEnabled
blending enabled or not
Definition: DtIndirectOpenGLState.h:121
DtIndirectBlendFunction myBlendFunction
the blending function
Definition: DtIndirectOpenGLState.h:127
non virtual container class for defining a blending function
Definition: DtIndirectBlendFunction.h:29
DtIndirectPolygonOffset myPolygonOffset
the polygon offset
Definition: DtIndirectOpenGLState.h:133
DtIndirectBlendEquation myBlendEquation
the blending equation
Definition: DtIndirectOpenGLState.h:130
SetInts mySetAttributes
Definition: DtIndirectOpenGLState.h:144
SetInts mySetModes
Definition: DtIndirectOpenGLState.h:143
non virtual container class for defining a blending equation
Definition: DtIndirectBlendEquation.h:30
unsigned int GLenum
Definition: DtGlTextureBufferObject.h:18
bool myCullFaceEnabled
culling enabled or not
Definition: DtIndirectOpenGLState.h:118
bool operator==(const DtTextureAtlasIndexParser::StringOrFloatAttrib &lhs, const DtTextureAtlasIndexParser::StringOrFloatAttrib &rhs)
needed for search comparison code
Definition: DtTextureAtlasIndexParser.h:153
non virtual container class for defining a polygon offset state
Definition: DtIndirectPolygonOffset.h:18
Contains DLL export macros.
GLenum myPrimitiveType
Definition: DtIndirectOpenGLState.h:135
DT_DLL_terrainCS bool operator!=(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
Contains the DtIndirectPolygonOffset class declaration.

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)