- Timestamp:
- 02/02/07 23:30:36 (6 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgshaderterrain/osgshaderterrain.cpp
r6051 r6088 241 241 } 242 242 243 class TestSupportOperation: public osg:: GraphicsOperation243 class TestSupportOperation: public osg::Operation 244 244 { 245 245 public: 246 246 247 247 TestSupportOperation(): 248 osg:: GraphicsOperation("TestSupportOperation",false),248 osg::Operation("TestSupportOperation",false), 249 249 _supported(true), 250 250 _errorMessage() {} 251 251 252 virtual void operator () (osg::GraphicsContext* gc) 253 { 254 osg::notify(osg::NOTICE)<<"Not called"<<std::endl; 252 virtual void operator () (osg::Object* object) 253 { 254 osg::GraphicsContext* gc = dynamic_cast<osg::GraphicsContext*>(object); 255 if (!gc) return; 255 256 256 257 OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex); … … 274 275 } 275 276 } 276 277 _supported = false; 278 _errorMessage = "ERROR: Pllalalal."; 279 277 else 278 { 279 _supported = false; 280 _errorMessage = "ERROR: GLSL not supported."; 281 } 280 282 } 281 283 … … 298 300 299 301 osg::ref_ptr<TestSupportOperation> testSupportOperation = new TestSupportOperation; 300 301 osgViewer::Viewer::Windows windows; 302 viewer.getWindows(windows); 303 for(osgViewer::Viewer::Windows::iterator itr = windows.begin(); 304 itr != windows.end(); 305 ++itr) 306 { 307 (*itr)->add(testSupportOperation.get()); 308 } 309 302 #if 0 303 // temporily commenting out as its causing the viewer to crash... no clue yet to why 304 viewer.setRealizeOperation(testSupportOperation.get()); 305 #endif 310 306 // create the windows and run the threads. 311 307 viewer.realize();
