From Mike Weiblen, ported osgshaders example from osgGL2 to core osg based.

This commit is contained in:
Robert Osfield
2005-04-07 20:20:09 +00:00
parent 923048fdb6
commit c8a3198129
6 changed files with 95 additions and 122 deletions

View File

@@ -1,5 +1,5 @@
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2003 Robert Osfield
* Copyright (C) 2003 3Dlabs Inc. Ltd.
* Copyright (C) 2003-2005 3Dlabs Inc. Ltd.
*
* This application is open source and may be redistributed and/or modified
* freely and without restriction, both in commericial and non commericial applications,
@@ -10,10 +10,10 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/* file: examples/osgshaders/osgshaders.cpp
* author: Mike Weiblen 2003-09-18
/* file: examples/osgglsl/osgshaders.cpp
* author: Mike Weiblen 2005-04-05
*
* A demo of the OpenGL Shading Language shaders using osgGL2.
* A demo of the OpenGL Shading Language shaders using core OSG.
*
* See http://www.3dlabs.com/opengl2/ for more information regarding
* the OpenGL Shading Language.
@@ -25,7 +25,6 @@
#include <osgDB/ReadFile>
#include <osgUtil/Optimizer>
#include <osgProducer/Viewer>
#include <osgGL2/Version>
#include "GL2Scene.h"
@@ -71,7 +70,7 @@ int main( int argc, char **argv )
// set up the usage document
args.getApplicationUsage()->setApplicationName(args.getApplicationName());
args.getApplicationUsage()->setDescription(args.getApplicationName() +
" demonstrates the OpenGL Shading Language using osgGL2");
" demonstrates the OpenGL Shading Language using core OSG");
args.getApplicationUsage()->setCommandLineUsage(args.getApplicationName());
args.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
@@ -98,7 +97,6 @@ int main( int argc, char **argv )
}
// create the scene
osg::notify(osg::NOTICE) << "osgGL2 version " << osgGL2GetVersion() << std::endl;
GL2ScenePtr gl2Scene = new GL2Scene;
viewer.setSceneData( gl2Scene->getRootNode().get() );