A confused question about ShareGeometry...

classic Classic list List threaded Threaded
3 messages Options
leo leo
Reply | Threaded
Open this post in threaded view
|

A confused question about ShareGeometry...

Hi everyone,

In function

void
DrawTileCommand::draw(osg::RenderInfo& ri, DrawState& dsMaster, osg::Referenced* layerData) const

the ShareGeometry _geom will be rendered by call statement" _geom->render(ptype, ri);"

As I know the tiles at the same latitude share the same ShareGeometry  "_geom"; So could I suppose that the tiles at the same latitude rendered with the same vertexs, normals,etc. however the tiles at the same altitude with different elevations.So the geometries of the tiles at the same altitude will be different.So how does the ShareGeometry work?
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: A confused question about ShareGeometry...

Leo,
In Rex, the elevation data is stored in a texture, not in the vertex data. So, tiles at the same latitude can share the same SharedGeometry but different elevation data is applied to each in a shader.
Glenn Waldron / Pelican Mapping
leo leo
Reply | Threaded
Open this post in threaded view
|

Re: A confused question about ShareGeometry...

gwaldron,
Thank you for your reply,Now I have an idea according to your explanation of the ShareGeometry.I wanna try to modify the buffer of the texture applied to the shader program.But i didn't find the interface to get the buffer of osg::Texture.