Adapted GLBeginEndAdapter to use state.drawQuad(..) rather than use it's local GL_QUADS emulation.

Fixed to osg::Texture for GLES support.

Added automatic GLenum mode mappings in osg::PrimitiveSet to provide a fallback for non support glDrawArray/glDrawElement modes.

Added finer gained error checking during StateSet::compile().
This commit is contained in:
Robert Osfield
2009-11-12 14:35:44 +00:00
parent efb9908644
commit 8b141567b9
5 changed files with 94 additions and 48 deletions

View File

@@ -1326,11 +1326,16 @@ void StateSet::setThreadSafeRefUnref(bool threadSafe)
void StateSet::compileGLObjects(State& state) const
{
bool checkForGLErrors = state.getCheckForGLErrors()==osg::State::ONCE_PER_ATTRIBUTE;
for(AttributeList::const_iterator itr = _attributeList.begin();
itr!=_attributeList.end();
++itr)
{
itr->second.first->compileGLObjects(state);
if (checkForGLErrors && state.checkGLErrors("StateSet::compileGLObejcts() compiling attribute"))
{
osg::notify(osg::NOTICE)<<" GL Error when compiling "<<itr->second.first->className()<<std::endl;
}
}
for(TextureAttributeList::const_iterator taitr=_textureAttributeList.begin();
@@ -1342,6 +1347,10 @@ void StateSet::compileGLObjects(State& state) const
++itr)
{
itr->second.first->compileGLObjects(state);
if (checkForGLErrors && state.checkGLErrors("StateSet::compileGLObejcts() compiling texture attribute"))
{
osg::notify(osg::NOTICE)<<" GL Error when compiling "<<itr->second.first->className()<<std::endl;
}
}
}
}