X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fscene%2Ftgdb%2FShaderGeometry.hxx;h=30c72fbe0d3092a5f64d278f6d2ab054fcfb5ada;hb=3b5665fe92802d3d36d6304cb2c184dc03e91de4;hp=243384c54be4ec9da4200f4b7a6e317abd6f7b1f;hpb=7151c3fac153fdeb12f4b4f1fd16d55ac6c89107;p=simgear.git diff --git a/simgear/scene/tgdb/ShaderGeometry.hxx b/simgear/scene/tgdb/ShaderGeometry.hxx index 243384c5..30c72fbe 100644 --- a/simgear/scene/tgdb/ShaderGeometry.hxx +++ b/simgear/scene/tgdb/ShaderGeometry.hxx @@ -24,6 +24,7 @@ #include +#include #include #include #include @@ -32,27 +33,27 @@ #include #include -#include "TreeBin.hxx" - namespace simgear { -class ShaderGeometry : public osg::Geometry +class ShaderGeometry : public osg::Drawable { public: ShaderGeometry() : varieties(1) - { + { + setSupportsDisplayList(false); } ShaderGeometry(int v) : varieties(v) - { + { + setSupportsDisplayList(false); } /** Copy constructor using CopyOp to manage deep vs shallow copy.*/ ShaderGeometry(const ShaderGeometry& ShaderGeometry,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): - osg::Geometry(ShaderGeometry,copyop) {} + osg::Drawable(ShaderGeometry,copyop) {} META_Object(flightgear, ShaderGeometry); @@ -64,16 +65,17 @@ class ShaderGeometry : public osg::Geometry _geometry = geometry; } - void addTree(const TreeBin::Tree& tree); + void addObject(const osg::Vec3& position, float scale, int texture_index); osg::ref_ptr _geometry; int varieties; + osg::ref_ptr _posScaleArray; + osg::ref_ptr _vertexAttribArray; protected: virtual ~ShaderGeometry() {} - }; }