Added new ARB vertex program state attribute and demo program,

sent in my Brede Johansen.
This commit is contained in:
Robert Osfield
2003-01-04 20:45:53 +00:00
parent 060975a05c
commit 3ef3666d0f
15 changed files with 661 additions and 46 deletions

View File

@@ -160,22 +160,23 @@ class DrawFogCoord : public osg::ConstValueVisitor
{
public:
DrawFogCoord(const FloatArray* fogcoords,const IndexArray* indices,
FogCoordProc fogCoordProc):
DrawFogCoord(const Array* fogcoords,const IndexArray* indices,FogCoordProc fogCoordProc):
_fogcoords(fogcoords),
_indices(indices),
_glFogCoord1fv(fogCoordProc) {}
void operator () (unsigned int pos)
{
if (_indices) _glFogCoord1fv(&(*_fogcoords)[_indices->index(pos)]);
else _glFogCoord1fv(&(*_fogcoords)[pos]);
if (_indices) _fogcoords->accept(_indices->index(pos),*this);
else _fogcoords->accept(pos,*this);
}
const FloatArray* _fogcoords;
virtual void apply(const GLfloat& v) { _glFogCoord1fv(&v); }
const Array* _fogcoords;
const IndexArray* _indices;
FogCoordProc _glFogCoord1fv;
FogCoordProc _glFogCoord1fv;
};