Changeset 13041 for OpenSceneGraph/trunk/include/osgUtil/SceneGraphBuilder
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osgUtil/SceneGraphBuilder
r12380 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 2 2 * 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 5 5 * (at your option) any later version. The full license is in LICENSE file 6 6 * included with this distribution, and on the openscenegraph.org website. 7 * 7 * 8 8 * This library is distributed in the hope that it will be useful, 9 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 11 * OpenSceneGraph Public License for more details. 12 12 */ … … 32 32 SceneGraphBuilder(); 33 33 34 // 34 // 35 35 // OpenGL 1.0 style building methods 36 36 // … … 43 43 void Scaled(GLdouble x, GLdouble y, GLdouble z); 44 44 void Rotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); 45 45 46 46 void BlendFunc(GLenum srcFactor, GLenum dstFactor); 47 47 void CullFace(GLenum mode); … … 55 55 void PolygonStipple(const GLubyte* mask); 56 56 void ShadeModel(GLenum mode); 57 57 58 58 void Enable(GLenum mode); 59 59 void Disable(GLenum mode); 60 60 61 61 void Color4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); 62 62 void Color4fv(GLfloat* c) { Color4f(c[0], c[1], c[2], c[3]); } … … 121 121 122 122 protected: 123 123 124 124 typedef std::vector<osg::Matrixd> Matrices; 125 125 126 126 void matrixChanged(); 127 127 void addAttribute(osg::StateAttribute* attribute); 128 void addMode(GLenum mode, bool enabled); 128 void addMode(GLenum mode, bool enabled); 129 129 void addTextureAttribute(unsigned int unit, osg::StateAttribute* attribute); 130 void addTextureMode(unsigned int unit, GLenum mode, bool enabled); 130 void addTextureMode(unsigned int unit, GLenum mode, bool enabled); 131 131 void addShape(osg::Shape* shape); 132 132 void addDrawable(osg::Drawable* drawable); 133 133 void newGeometry(); 134 134 135 135 void allocateGeometry(); 136 136 void completeGeometry(); 137 137 138 138 void allocateStateSet(); 139 139 140 140 Matrices _matrixStack; 141 141 osg::ref_ptr<osg::StateSet> _stateset; 142 142 bool _statesetAssigned; 143 143 144 144 bool _normalSet; 145 145 osg::Vec3f _normal; … … 156 156 osg::ref_ptr<osg::Vec4Array> _colors; 157 157 osg::ref_ptr<osg::Vec4Array> _texCoords; 158 158 159 159 struct QuadricState 160 160 { … … 178 178 osg::ref_ptr<osg::MatrixTransform> _transform; 179 179 osg::ref_ptr<osg::Group> _group; 180 180 181 181 }; 182 182
