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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user