I am trying to get country boundaries to show up in my osgEarth application but am not having much luck. It worked in v2.8 but doesn't work in 3.0 on either Windows or Linux. I am using the shapefile that I got from here in the Admin 0 - Countries section:
I think I tried that GLUtils call yesterday after comparing ExampleResources.cpp against my own viewer initialization but for some reason it didn't work. It works today so I must have had the call in the wrong place or something else I had done was interfering with it.
The country boundaries are showing up now but I am getting a lot of GL errors from Qt:
QOpenGLDebugMessage("APISource", 2311, "glEnable parameter <active texture> has an invalid value '31': must be less than 8 (GL_INVALID_VALUE)", "HighSeverity", "ErrorType")
When I look at the GLIntercept output I get this:
glEnable(GL_TEXTURE_2D) glGetError() = GL_INVALID_VALUE
I will step through the code in the debugger to see what is trying to use GL_TEXTURE31.
I also see this but I don't think it is part of the issue:
QOpenGLDebugMessage("APISource", 102, "glDrawElements uses element index type 'GL_UNSIGNED_BYTE' that is not optimal for the current hardware configuration; consider using 'GL_UNSIGNED_SHORT' instead", "MediumSeverity", "PerformanceType")
Ok I figured out the reason for the error. I needed to include a call to MapNode::open() that I missed during the port from 2.8 to 3.0. That was the last remaining difference between my existing application and the new examples & ExampleResources.cpp.
So for those who may be experiencing similar issues when trying to upgrade from 2.8 to 3.0 -- in addition to porting my existing osgEarth API usage I had to add three calls at the proper places: