Fixed support for compiling VBO's
This commit is contained in:
parent
6e7c02b5d8
commit
5f61d14dc6
@ -495,16 +495,26 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
|
||||
inline static bool isCompiled(const osg::Drawable* drawable,
|
||||
unsigned int contextID)
|
||||
{
|
||||
// Worry about vbos later
|
||||
if (drawable->getUseDisplayList())
|
||||
if (drawable->getUseVertexBufferObjects())
|
||||
{
|
||||
// say it's not compiled leaving it up to the compileGLObjects() to handle.
|
||||
return false;
|
||||
}
|
||||
else if (drawable->getUseDisplayList())
|
||||
{
|
||||
return drawable->getDisplayList(contextID) != 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool isCompiled(const osg::Drawable* drawable) const
|
||||
{
|
||||
if (drawable->getUseVertexBufferObjects())
|
||||
{
|
||||
// say it's not compiled leaving it up to the compileGLObjects() to handle.
|
||||
return false;
|
||||
}
|
||||
if (drawable->getUseDisplayList())
|
||||
{
|
||||
for (ActiveGraphicsContexts::const_iterator iter=_activeGraphicsContexts.begin();
|
||||
|
@ -239,9 +239,8 @@ public:
|
||||
//
|
||||
// XXX This "compiles" VBOs too, but compilation doesn't do
|
||||
// anything for VBOs, does it?
|
||||
if (_dataToCompile && drawable->getUseDisplayList() && !_pager->isCompiled(drawable))
|
||||
if (_dataToCompile && (drawable->getUseVertexBufferObjects() || drawable->getUseDisplayList()) && !_pager->isCompiled(drawable))
|
||||
{
|
||||
// osg::notify(osg::NOTICE)<<" Found compilable drawable"<<std::endl;
|
||||
_dataToCompile->second.push_back(drawable);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user