Changeset 13041 for OpenSceneGraph/trunk/include/osg/State
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/include/osg/State (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osg/State
r12660 r13041 143 143 * The ContextID is used by classes like osg::StateAttribute's and osg::Drawable's to 144 144 * help manage seperate OpenGL objects, such as display lists, vertex buffer objects 145 * and texture object for each graphics context. The ContextID simply acts as an index 145 * and texture object for each graphics context. The ContextID simply acts as an index 146 146 * into arrays that these classes maintain for the purpose of storing GL object handles. 147 * 147 * 148 148 * Note, osgViewer::GraphicsWindow will automatically set up the ContextID for you, 149 149 * so you will rearely need to set this yourself. 150 * 150 * 151 151 * The exception is when creating your own graphics context, where you should set 152 152 * the ContextID uniquely for each graphics context. 153 * 153 * 154 154 * Typical settings for ContextID are 0,1,2,3... up to the maximum 155 155 * number of graphics contexts you have set up. By default contextID is 0. … … 408 408 void haveAppliedAttribute(const StateAttribute* attribute); 409 409 410 /** Attribute has been applied externally, 411 * and therefore this attribute type has been dirtied 410 /** Attribute has been applied externally, 411 * and therefore this attribute type has been dirtied 412 412 * and will need to be re-applied on next osg::State.apply(..). 413 413 * note, if you have an osg::StateAttribute which you have applied externally … … 1183 1183 * note, only updates values that change.*/ 1184 1184 inline bool setActiveTextureUnit( unsigned int unit ); 1185 1185 1186 1186 /** Get the current texture unit.*/ 1187 1187 unsigned int getActiveTextureUnit() const { return _currentActiveTextureUnit; } … … 1269 1269 * retrofited into OSG for backward compatibility with osgCal, 1270 1270 * after uniform ids were refactored from std::strings to GLints in OSG version 2.9.10. 1271 * 1272 * Drawbacks: This method is not particularly fast. It has to access mutexed static 1271 * 1272 * Drawbacks: This method is not particularly fast. It has to access mutexed static 1273 1273 * map of uniform ids. So don't overuse it or your app performance will suffer. 1274 1274 */ … … 1339 1339 /** Get the number of dynamic objects that will be rendered in this graphics context this frame.*/ 1340 1340 unsigned int getDynamicObjectCount() const { return _dynamicObjectCount; } 1341 1342 /** Decrement the number of dynamic objects left to render this frame, and once the count goes to zero call the 1341 1342 /** Decrement the number of dynamic objects left to render this frame, and once the count goes to zero call the 1343 1343 * DynamicObjectRenderingCompletedCallback to inform of completion.*/ 1344 1344 inline void decrementDynamicObjectCount() … … 1511 1511 last_applied_shadercomponent = 0L; 1512 1512 global_default_attribute = 0L; 1513 1513 1514 1514 } 1515 1515 … … 1846 1846 1847 1847 osg::ref_ptr<GraphicsCostEstimator> _graphicsCostEstimator; 1848 1848 1849 1849 Timer_t _startTick; 1850 1850 Timer_t _gpuTick;
