#include <OSGPointChunk.h>
Inheritance diagram for osg::PointChunk:

Public Types | |
| typedef PointChunkPtr | Ptr |
| enum | { SizeFieldId = Inherited::NextFieldId, SmoothFieldId = SizeFieldId + 1, MinSizeFieldId = SmoothFieldId + 1, MaxSizeFieldId = MinSizeFieldId + 1, ConstantAttenuationFieldId = MaxSizeFieldId + 1, LinearAttenuationFieldId = ConstantAttenuationFieldId + 1, QuadraticAttenuationFieldId = LinearAttenuationFieldId + 1, FadeThresholdFieldId = QuadraticAttenuationFieldId + 1, SpriteFieldId = FadeThresholdFieldId + 1, RModeFieldId = SpriteFieldId + 1, NextFieldId = RModeFieldId + 1 } |
Public Member Functions | |
Parents | |
| *MFFieldContainerPtr & | getParents (void) |
| const MFFieldContainerPtr & | getParents (void) const |
| MFFieldContainerPtr * | getMFParents (void) |
| void | addParent (FieldContainerPtr parent) |
| void | subParent (FieldContainerPtr parent) |
| Int32 | findParent (FieldContainerPtr parent) |
Parents | |
| *SFBool & | getInternal (void) |
| const SFBool & | getInternal (void) const |
| SFBool * | getSFInternal (void) |
| void | setInternal (bool bVal) |
Parents | |
| *MFFieldContainerPtr & | getParents (void) |
| const MFFieldContainerPtr & | getParents (void) const |
| MFFieldContainerPtr * | getMFParents (void) |
| void | addParent (FieldContainerPtr parent) |
| void | subParent (FieldContainerPtr parent) |
| Int32 | findParent (FieldContainerPtr parent) |
Parents | |
| *SFBool & | getInternal (void) |
| const SFBool & | getInternal (void) const |
| SFBool * | getSFInternal (void) |
| void | setInternal (bool bVal) |
Parents | |
| *MFFieldContainerPtr & | getParents (void) |
| const MFFieldContainerPtr & | getParents (void) const |
| MFFieldContainerPtr * | getMFParents (void) |
| void | addParent (FieldContainerPtr parent) |
| void | subParent (FieldContainerPtr parent) |
| Int32 | findParent (FieldContainerPtr parent) |
Parents | |
| *SFBool & | getInternal (void) |
| const SFBool & | getInternal (void) const |
| SFBool * | getSFInternal (void) |
| void | setInternal (bool bVal) |
Chunk Class Access | |
| *virtual const StateChunkClass * | getClass (void) const |
Sync | |
| *virtual void | changed (BitVector whichField, UInt32 origin) |
Output | |
| *virtual void | dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const |
State Commands | |
| *virtual void | activate (DrawActionBase *action, UInt32 index=0) |
| virtual void | changeFrom (DrawActionBase *action, StateChunk *old, UInt32 index=0) |
| virtual void | deactivate (DrawActionBase *action, UInt32 index=0) |
| virtual bool | isTransparent (void) const |
Comparison | |
| *virtual Real32 | switchCost (StateChunk *chunk) |
| virtual bool | operator< (const StateChunk &other) const |
| virtual bool | operator== (const StateChunk &other) const |
| virtual bool | operator!= (const StateChunk &other) const |
FieldContainer Get | |
| *virtual FieldContainerType & | getType (void) |
| virtual const FieldContainerType & | getType (void) const |
| virtual UInt32 | getContainerSize (void) const |
Field Get | |
| *SFReal32 * | getSFSize (void) |
| Get the PointChunk::_sfSize field. | |
| SFBool * | getSFSmooth (void) |
| Get the PointChunk::_sfSmooth field. | |
| SFReal32 * | getSFMinSize (void) |
| Get the PointChunk::_sfMinSize field. | |
| SFReal32 * | getSFMaxSize (void) |
| Get the PointChunk::_sfMaxSize field. | |
| SFReal32 * | getSFConstantAttenuation (void) |
| Get the PointChunk::_sfConstantAttenuation field. | |
| SFReal32 * | getSFLinearAttenuation (void) |
| Get the PointChunk::_sfLinearAttenuation field. | |
| SFReal32 * | getSFQuadraticAttenuation (void) |
| Get the PointChunk::_sfQuadraticAttenuation field. | |
| SFReal32 * | getSFFadeThreshold (void) |
| Get the PointChunk::_sfFadeThreshold field. | |
| SFBool * | getSFSprite (void) |
| Get the PointChunk::_sfSprite field. | |
| SFGLenum * | getSFRMode (void) |
| Get the PointChunk::_sfRMode field. | |
| Real32 & | getSize (void) |
| Get the value of the PointChunk::_sfSize field. | |
| const Real32 & | getSize (void) const |
| Get the value of the PointChunk::_sfSize field. | |
| bool & | getSmooth (void) |
| Get the value of the PointChunk::_sfSmooth field. | |
| const bool & | getSmooth (void) const |
| Get the value of the PointChunk::_sfSmooth field. | |
| Real32 & | getMinSize (void) |
| Get the value of the PointChunk::_sfMinSize field. | |
| const Real32 & | getMinSize (void) const |
| Get the value of the PointChunk::_sfMinSize field. | |
| Real32 & | getMaxSize (void) |
| Get the value of the PointChunk::_sfMaxSize field. | |
| const Real32 & | getMaxSize (void) const |
| Get the value of the PointChunk::_sfMaxSize field. | |
| Real32 & | getConstantAttenuation (void) |
| Get the value of the PointChunk::_sfConstantAttenuation field. | |
| const Real32 & | getConstantAttenuation (void) const |
| Get the value of the PointChunk::_sfConstantAttenuation field. | |
| Real32 & | getLinearAttenuation (void) |
| Get the value of the PointChunk::_sfLinearAttenuation field. | |
| const Real32 & | getLinearAttenuation (void) const |
| Get the value of the PointChunk::_sfLinearAttenuation field. | |
| Real32 & | getQuadraticAttenuation (void) |
| Get the value of the PointChunk::_sfQuadraticAttenuation field. | |
| const Real32 & | getQuadraticAttenuation (void) const |
| Get the value of the PointChunk::_sfQuadraticAttenuation field. | |
| Real32 & | getFadeThreshold (void) |
| Get the value of the PointChunk::_sfFadeThreshold field. | |
| const Real32 & | getFadeThreshold (void) const |
| Get the value of the PointChunk::_sfFadeThreshold field. | |
| bool & | getSprite (void) |
| Get the value of the PointChunk::_sfSprite field. | |
| const bool & | getSprite (void) const |
| Get the value of the PointChunk::_sfSprite field. | |
| GLenum & | getRMode (void) |
| Get the value of the PointChunk::_sfRMode field. | |
| const GLenum & | getRMode (void) const |
| Get the value of the PointChunk::_sfRMode field. | |
Field Set | |
| *void | setSize (const Real32 &value) |
| Set the value of the PointChunk::_sfSize field. | |
| void | setSmooth (const bool &value) |
| Set the value of the PointChunk::_sfSmooth field. | |
| void | setMinSize (const Real32 &value) |
| Set the value of the PointChunk::_sfMinSize field. | |
| void | setMaxSize (const Real32 &value) |
| Set the value of the PointChunk::_sfMaxSize field. | |
| void | setConstantAttenuation (const Real32 &value) |
| Set the value of the PointChunk::_sfConstantAttenuation field. | |
| void | setLinearAttenuation (const Real32 &value) |
| Set the value of the PointChunk::_sfLinearAttenuation field. | |
| void | setQuadraticAttenuation (const Real32 &value) |
| Set the value of the PointChunk::_sfQuadraticAttenuation field. | |
| void | setFadeThreshold (const Real32 &value) |
| Set the value of the PointChunk::_sfFadeThreshold field. | |
| void | setSprite (const bool &value) |
| Set the value of the PointChunk::_sfSprite field. | |
| void | setRMode (const GLenum &value) |
| Set the value of the PointChunk::_sfRMode field. | |
Binary Access | |
| *virtual UInt32 | getBinSize (const BitVector &whichField) |
| virtual void | copyToBin (BinaryDataHandler &pMem, const BitVector &whichField) |
| virtual void | copyFromBin (BinaryDataHandler &pMem, const BitVector &whichField) |
Copy | |
| *virtual FieldContainerPtr | shallowCopy (void) const |
Chunk Class Access | |
| *UInt32 | getClassId (void) const |
Parents | |
| *MFFieldContainerPtr & | getParents (void) |
| const MFFieldContainerPtr & | getParents (void) const |
| MFFieldContainerPtr * | getMFParents (void) |
| void | addParent (FieldContainerPtr parent) |
| void | subParent (FieldContainerPtr parent) |
| Int32 | findParent (FieldContainerPtr parent) |
Parents | |
| *SFBool & | getInternal (void) |
| const SFBool & | getInternal (void) const |
| SFBool * | getSFInternal (void) |
| void | setInternal (bool bVal) |
Static Public Member Functions | |
Static Chunk Class Access | |
| *static UInt32 | getStaticClassId (void) |
| static const StateChunkClass * | getStaticClass (void) |
Class Get | |
| *static FieldContainerType & | getClassType (void) |
| access the type of the class | |
| static UInt32 | getClassTypeId (void) |
| access the numerical type of the class | |
Construction | |
| *static PointChunkPtr | create (void) |
| create a new instance of the class | |
| static PointChunkPtr | createEmpty (void) |
| create an empty new instance of the class, do not copy the prototype | |
Static Public Attributes | |
| static const osg::BitVector | SizeFieldMask |
| static const osg::BitVector | SmoothFieldMask |
| static const osg::BitVector | MinSizeFieldMask |
| static const osg::BitVector | MaxSizeFieldMask |
| static const osg::BitVector | ConstantAttenuationFieldMask |
| static const osg::BitVector | LinearAttenuationFieldMask |
| static const osg::BitVector | QuadraticAttenuationFieldMask |
| static const osg::BitVector | FadeThresholdFieldMask |
| static const osg::BitVector | SpriteFieldMask |
| static const osg::BitVector | RModeFieldMask |
| static const osg::BitVector | MTInfluenceMask |
| static const BitVector | InternalFieldMask = (1 << Attachment::InternalFieldId) |
| static const BitVector | ParentsFieldMask = (1 << Attachment::ParentsFieldId) |
| static const BitVector | NextFieldMask |
CoredNodePtr helper | |
| static const bool | isNodeCore = false |
CoredNodePtr helper | |
| static const bool | isNodeCore = false |
CoredNodePtr helper | |
| static const bool | isNodeCore = false |
CoredNodePtr helper | |
| static const bool | isNodeCore = false |
CoredNodePtr helper | |
| static const bool | isNodeCore = false |
CoredNodePtr helper | |
| static const bool | isNodeCore = false |
CoredNodePtr helper | |
| static const bool | isNodeCore = false |
Protected Member Functions | |
Sync | |
| void | executeSyncImpl (Attachment *pOther, const BitVector &whichField) |
MT Destruction | |
| *virtual void | onDestroy (void) |
Sync | |
| void | executeSyncImpl (Attachment *pOther, const BitVector &whichField) |
MT Destruction | |
| *virtual void | onDestroy (void) |
Sync | |
| void | executeSyncImpl (Attachment *pOther, const BitVector &whichField) |
MT Destruction | |
| *virtual void | onDestroy (void) |
Constructors | |
| * | PointChunk (void) |
| PointChunk (const PointChunk &source) | |
Destructors | |
| *virtual | ~PointChunk (void) |
Sync | |
| *void | executeSyncImpl (PointChunkBase *pOther, const BitVector &whichField) |
| virtual void | executeSync (FieldContainer &other, const BitVector &whichField) |
Sync | |
| *void | executeSyncImpl (StateChunkBase *pOther, const BitVector &whichField) |
Sync | |
| void | executeSyncImpl (Attachment *pOther, const BitVector &whichField) |
MT Destruction | |
| *virtual void | onDestroy (void) |
Protected Attributes | |
Fields | |
| *SFBool | _sfInternal |
| MFFieldContainerPtr | _parents |
Fields | |
| *SFBool | _sfInternal |
| MFFieldContainerPtr | _parents |
Fields | |
| *SFBool | _sfInternal |
| MFFieldContainerPtr | _parents |
Fields | |
| *SFReal32 | _sfSize |
| SFBool | _sfSmooth |
| SFReal32 | _sfMinSize |
| SFReal32 | _sfMaxSize |
| SFReal32 | _sfConstantAttenuation |
| SFReal32 | _sfLinearAttenuation |
| SFReal32 | _sfQuadraticAttenuation |
| SFReal32 | _sfFadeThreshold |
| SFBool | _sfSprite |
| SFGLenum | _sfRMode |
Fields | |
| *SFBool | _sfInternal |
| MFFieldContainerPtr | _parents |
Private Types | |
| typedef PointChunkBase | Inherited |
Private Member Functions | |
| void | operator= (const PointChunk &source) |
Static Private Member Functions | |
| static void | initMethod (void) |
Static Private Attributes | |
| static StateChunkClass | _class |
OpenGL Extension Handling | |
| *static UInt32 | _arbPointParameters |
| static UInt32 | _nvPointSprite |
| static UInt32 | _funcPointParameterf |
| static UInt32 | _funcPointParameterfv |
Friends | |
| class | FieldContainer |
| class | PointChunkBase |
This chunk wraps glPointSize() (osg::PointChunk::_sfSize) and glEnable(GL_POINT_SMOOTH) (osg::PointChunk::_sfSmooth). It encompasses the ARB_point_parameters extension (osg::PointChunk::_sfMinSize, osg::PointChunk::_sfMaxSize, osg::PointChunk::_sfFadeThreshold, osg::PointChunk::_sfConstantAttenuation, osg::PointChunk::_sfLinearAttenuation, osg::PointChunk::_sfQuadraticAttenuation) and NV_point_sprite (osg::PointChunk::_sfSprite, osg::PointChunk::_sfRMode).
Definition at line 54 of file OSGPointChunk.h.
|
|
Reimplemented from osg::PointChunkBase. Definition at line 58 of file OSGPointChunk.h. |
|
|
Reimplemented from osg::StateChunkBase. Definition at line 99 of file OSGPointChunkBase.h. |
|
|
Reimplemented from osg::Attachment. Definition at line 101 of file OSGPointChunkBase.h. 00102 { 00103 SizeFieldId = Inherited::NextFieldId, 00104 SmoothFieldId = SizeFieldId + 1, 00105 MinSizeFieldId = SmoothFieldId + 1, 00106 MaxSizeFieldId = MinSizeFieldId + 1, 00107 ConstantAttenuationFieldId = MaxSizeFieldId + 1, 00108 LinearAttenuationFieldId = ConstantAttenuationFieldId + 1, 00109 QuadraticAttenuationFieldId = LinearAttenuationFieldId + 1, 00110 FadeThresholdFieldId = QuadraticAttenuationFieldId + 1, 00111 SpriteFieldId = FadeThresholdFieldId + 1, 00112 RModeFieldId = SpriteFieldId + 1, 00113 NextFieldId = RModeFieldId + 1 00114 };
|
|
|
Definition at line 103 of file OSGPointChunk.cpp. References _arbPointParameters, _funcPointParameterf, _funcPointParameterfv, _nvPointSprite, OSG_DLSYM_UNDERSCORE, osg::Window::registerExtension(), and osg::Window::registerFunction(). 00103 : 00104 Inherited() 00105 { 00106 _arbPointParameters = 00107 Window::registerExtension("GL_EXT_point_parameters"); 00108 _nvPointSprite = 00109 Window::registerExtension("GL_NV_point_sprite"); 00110 _funcPointParameterf = Window::registerFunction( 00111 OSG_DLSYM_UNDERSCORE"glPointParameterfEXT", _arbPointParameters); 00112 _funcPointParameterfv = Window::registerFunction( 00113 OSG_DLSYM_UNDERSCORE"glPointParameterfvEXT", _arbPointParameters); 00114 }
|
|
|
Definition at line 116 of file OSGPointChunk.cpp. 00116 : 00117 Inherited(source) 00118 { 00119 }
|
|
|
Definition at line 121 of file OSGPointChunk.cpp.
|
|
|
Reimplemented from osg::StateChunk. Definition at line 127 of file OSGPointChunk.cpp. References _class. 00128 { 00129 return &_class; 00130 }
|
|
|
Reimplemented from osg::StateChunk. Definition at line 46 of file OSGPointChunk.inl. References osg::StateChunkClass::getId(), and getStaticClass(). 00047 { 00048 return getStaticClass()->getId(); 00049 }
|
|
|
Reimplemented from osg::StateChunk. Definition at line 52 of file OSGPointChunk.inl. References _class. Referenced by getStaticClassId(). 00053 { 00054 return &PointChunk::_class; 00055 }
|
|
||||||||||||
|
Reimplemented from osg::StateChunk. Definition at line 134 of file OSGPointChunk.cpp. References osg::StateChunk::changed(). 00135 { 00136 Inherited::changed(whichField, origin); 00137 }
|
|
||||||||||||
|
Reimplemented from osg::StateChunk. Definition at line 139 of file OSGPointChunk.cpp. References SLOG. 00141 { 00142 SLOG << "Dump PointChunk NI" << std::endl; 00143 }
|
|
||||||||||||
|
Activate the chunk, i.e. set the OpenGl state covered by the chunk which is different from the default state to the given state. Reimplemented from osg::StateChunk. Definition at line 147 of file OSGPointChunk.cpp. References _arbPointParameters, _funcPointParameterf, _funcPointParameterfv, _nvPointSprite, osg::PointChunkBase::getConstantAttenuation(), osg::PointChunkBase::getFadeThreshold(), osg::Window::getFunction(), osg::PointChunkBase::getLinearAttenuation(), osg::PointChunkBase::getMaxSize(), osg::PointChunkBase::getMinSize(), osg::PointChunkBase::getQuadraticAttenuation(), osg::PointChunkBase::getRMode(), osg::PointChunkBase::getSize(), osg::PointChunkBase::getSmooth(), osg::PointChunkBase::getSprite(), osg::DrawActionBase::getWindow(), GL_POINT_DISTANCE_ATTENUATION_ARB, GL_POINT_FADE_THRESHOLD_SIZE_ARB, GL_POINT_SIZE_MAX_ARB, GL_POINT_SIZE_MIN_ARB, GL_POINT_SPRITE_NV, GL_POINT_SPRITE_R_MODE_NV, GLenum, osg::Window::hasExtension(), and OSG_APIENTRY. 00148 { 00149 if(getSize() != 1.f) 00150 glPointSize(getSize()); 00151 00152 if(getSmooth()) 00153 glEnable(GL_POINT_SMOOTH); 00154 00155 #if GL_ARB_point_parameters 00156 if(getMinSize() >= 0.f) 00157 { 00158 if(action->getWindow()->hasExtension(_arbPointParameters)) 00159 { 00160 // get "glPointParameterfARB" function pointer 00161 void (OSG_APIENTRY*pointparameterf)(GLenum pname, GLfloat param) = 00162 (void (OSG_APIENTRY*)(GLenum pname, GLfloat param)) 00163 action->getWindow()->getFunction( _funcPointParameterf ); 00164 // get "glPointParameterfvARB" function pointer 00165 void (OSG_APIENTRY*pointparameterfv)(GLenum pname, 00166 const GLfloat *param) = 00167 (void (OSG_APIENTRY*)(GLenum pname, const GLfloat *param)) 00168 action->getWindow()->getFunction( _funcPointParameterfv ); 00169 00170 pointparameterf(GL_POINT_SIZE_MIN_ARB, getMinSize()); 00171 pointparameterf(GL_POINT_SIZE_MAX_ARB, getMaxSize()); 00172 pointparameterf(GL_POINT_FADE_THRESHOLD_SIZE_ARB, 00173 getFadeThreshold()); 00174 00175 GLfloat att[3] = { getConstantAttenuation(), 00176 getLinearAttenuation(), 00177 getQuadraticAttenuation() }; 00178 00179 pointparameterfv(GL_POINT_DISTANCE_ATTENUATION_ARB, att); 00180 } 00181 00182 } 00183 #endif 00184 00185 #if GL_NV_point_sprite 00186 if(getSprite()) 00187 { 00188 if(action->getWindow()->hasExtension(_nvPointSprite)) 00189 { 00190 // get "glPointParameterfARB" function pointer 00191 void (OSG_APIENTRY*pointparameterf)(GLenum pname, GLfloat param) = 00192 (void (OSG_APIENTRY*)(GLenum pname, GLfloat param)) 00193 action->getWindow()->getFunction( _funcPointParameterf ); 00194 00195 pointparameterf(GL_POINT_SPRITE_R_MODE_NV, Real32(getRMode())); 00196 00197 glEnable(GL_POINT_SPRITE_NV); 00198 } 00199 00200 } 00201 #endif 00202 00203 #if ! defined(GL_ARB_point_parameters) && ! defined(GL_NV_point_sprite) 00204 action; 00205 #endif 00206 }
|
|
||||||||||||||||
|
Change from an old chunk of the same type to this chunk. Note that in general no type checking is done, make sure to use this on a legal combination of chunks! Reimplemented from osg::StateChunk. Definition at line 208 of file OSGPointChunk.cpp. References _arbPointParameters, _funcPointParameterf, _funcPointParameterfv, _nvPointSprite, osg::PointChunkBase::getConstantAttenuation(), osg::PointChunkBase::getFadeThreshold(), osg::Window::getFunction(), osg::PointChunkBase::getLinearAttenuation(), osg::PointChunkBase::getMaxSize(), osg::PointChunkBase::getMinSize(), osg::PointChunkBase::getQuadraticAttenuation(), osg::PointChunkBase::getRMode(), osg::PointChunkBase::getSize(), osg::PointChunkBase::getSmooth(), osg::PointChunkBase::getSprite(), osg::DrawActionBase::getWindow(), GL_POINT_DISTANCE_ATTENUATION_ARB, GL_POINT_FADE_THRESHOLD_SIZE_ARB, GL_POINT_SIZE_MAX_ARB, GL_POINT_SIZE_MIN_ARB, GL_POINT_SPRITE_NV, GL_POINT_SPRITE_R_MODE_NV, GLenum, osg::Window::hasExtension(), and OSG_APIENTRY. 00211 { 00212 PointChunk *old = dynamic_cast<PointChunk *>(old_chunk); 00213 00214 if(getSize() != old->getSize()) 00215 glPointSize(getSize()); 00216 00217 if(getSmooth() && !old->getSmooth()) 00218 { 00219 glEnable(GL_POINT_SMOOTH); 00220 } 00221 else if(!getSmooth() && old->getSmooth()) 00222 { 00223 glDisable(GL_POINT_SMOOTH); 00224 } 00225 00226 #if GL_ARB_point_parameters 00227 if(getMinSize() >= 0.f) 00228 { 00229 if(action->getWindow()->hasExtension(_arbPointParameters)) 00230 { 00231 // get "glPointParameterfARB" function pointer 00232 void (OSG_APIENTRY*pointparameterf)(GLenum pname, GLfloat param) = 00233 (void (OSG_APIENTRY*)(GLenum pname, GLfloat param)) 00234 action->getWindow()->getFunction( _funcPointParameterf ); 00235 // get "glPointParameterfvARB" function pointer 00236 void (OSG_APIENTRY*pointparameterfv)(GLenum pname, 00237 const GLfloat *param) = 00238 (void (OSG_APIENTRY*)(GLenum pname, const GLfloat *param)) 00239 action->getWindow()->getFunction( _funcPointParameterfv ); 00240 00241 pointparameterf(GL_POINT_SIZE_MIN_ARB, getMinSize()); 00242 pointparameterf(GL_POINT_SIZE_MAX_ARB, getMaxSize()); 00243 pointparameterf(GL_POINT_FADE_THRESHOLD_SIZE_ARB, 00244 getFadeThreshold()); 00245 00246 GLfloat att[3] = { getConstantAttenuation(), 00247 getLinearAttenuation(), 00248 getQuadraticAttenuation() }; 00249 00250 pointparameterfv(GL_POINT_DISTANCE_ATTENUATION_ARB, att); 00251 } 00252 00253 } 00254 else if(old->getMinSize() >= 0.f) 00255 { 00256 if(action->getWindow()->hasExtension(_arbPointParameters)) 00257 { 00258 // get "glPointParameterfARB" function pointer 00259 void (OSG_APIENTRY*pointparameterf)(GLenum pname, GLfloat param) = 00260 (void (OSG_APIENTRY*)(GLenum pname, GLfloat param)) 00261 action->getWindow()->getFunction( _funcPointParameterf ); 00262 // get "glPointParameterfvARB" function pointer 00263 void (OSG_APIENTRY*pointparameterfv)(GLenum pname, 00264 const GLfloat *param) = 00265 (void (OSG_APIENTRY*)(GLenum pname, const GLfloat *param)) 00266 action->getWindow()->getFunction( _funcPointParameterfv ); 00267 00268 pointparameterf(GL_POINT_SIZE_MIN_ARB, 0); 00269 pointparameterf(GL_POINT_SIZE_MAX_ARB, 1e10); 00270 pointparameterf(GL_POINT_FADE_THRESHOLD_SIZE_ARB, 1); 00271 00272 GLfloat att[3] = { 1, 0, 0 }; 00273 00274 pointparameterfv(GL_POINT_DISTANCE_ATTENUATION_ARB, att); 00275 } 00276 } 00277 #endif 00278 00279 #if GL_NV_point_sprite 00280 if(getSprite() && !old->getSprite()) 00281 { 00282 if(action->getWindow()->hasExtension(_nvPointSprite)) 00283 { 00284 // get "glPointParameterfARB" function pointer 00285 void (OSG_APIENTRY*pointparameterf)(GLenum pname, GLfloat param) = 00286 (void (OSG_APIENTRY*)(GLenum pname, GLfloat param)) 00287 action->getWindow()->getFunction( _funcPointParameterf ); 00288 00289 pointparameterf(GL_POINT_SPRITE_R_MODE_NV, Real32(getRMode())); 00290 00291 glEnable(GL_POINT_SPRITE_NV); 00292 } 00293 00294 } 00295 else if(!getSprite() && old->getSprite()) 00296 { 00297 if(action->getWindow()->hasExtension(_nvPointSprite)) 00298 { 00299 glDisable(GL_POINT_SPRITE_NV); 00300 } 00301 00302 } 00303 #endif 00304 00305 #if ! defined(GL_ARB_point_parameters) && ! defined(GL_NV_point_sprite) 00306 action; 00307 #endif 00308 }
|
|
||||||||||||
|
Deactivate the chunk, i.e. set the OpenGl state covered by the chunk which is different from the default state to the default state. Reimplemented from osg::StateChunk. Definition at line 310 of file OSGPointChunk.cpp. References _arbPointParameters, _funcP |