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().