root/OpenSceneGraph/trunk/examples/osgshaders/GL2Scene.h @ 5328

Revision 5328, 1.3 kB (checked in by robert, 8 years ago)

Updated copyright years.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2 * Copyright (C) 2003-2005 3Dlabs Inc. Ltd.
3 *
4 * This application is open source and may be redistributed and/or modified   
5 * freely and without restriction, both in commericial and non commericial applications,
6 * as long as this copyright notice is maintained.
7 *
8 * This application is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11*/
12
13/* file:        examples/osgglsl/GL2Scene.h
14 * author:      Mike Weiblen 2005-03-30
15 *
16 * See http://www.3dlabs.com/opengl2/ for more information regarding
17 * the OpenGL Shading Language.
18*/
19
20#include <osg/Node>
21#include <osg/Referenced>
22#include <osg/ref_ptr>
23
24#include <osg/Program>
25
26class GL2Scene : public osg::Referenced
27{
28    public:
29        GL2Scene();
30
31        osg::ref_ptr<osg::Group> getRootNode() { return _rootNode; }
32        void reloadShaderSource();
33        void toggleShaderEnable();
34
35    protected:
36        ~GL2Scene();
37
38    private:    /*methods*/
39        osg::ref_ptr<osg::Group> buildScene();
40
41    private:    /*data*/
42        osg::ref_ptr<osg::Group> _rootNode;
43        std::vector< osg::ref_ptr<osg::Program> > _programList;
44        bool _shadersEnabled;
45};
46
47typedef osg::ref_ptr<GL2Scene> GL2ScenePtr;
48
49/*EOF*/
Note: See TracBrowser for help on using the browser.