ros-visualization/rviz — pull request #558 by wjwwood (2013-01-18 21:18:57+00:00)
Title: opengl is defaulting to 2.x on OS X

For some reason the OpenGL context is defaulting to 2.x on OS X, which results in this at runtime:

```
∫ rosrun rviz rviz
[ INFO] [1357093649.932935000]: rviz version 1.9.18
[ INFO] [1357093649.933012000]: compiled against OGRE version 1.7.4 (Cthugha)
2013-01-01 18:27:32.905 rviz[44560:f0b] invalid drawable
[ WARN] [1357093652.974725000]: OGRE EXCEPTION(7:InternalErrorException): Cannot compile GLSL high-level shader : rviz/box.geom Cannot compile GLSL high-level shader : rviz/box.geom ERROR: 0:1: '' : version '150' is not supported
ERROR: 0:18: ';' : syntax error Uniform blocks may not have identifiers in GLSL 140
ERROR: 0:23: 'layout' : syntax error syntax error
in GLSLProgram::compile at /tmp/ogre-HGWB/ogre_src_v1-7-4/RenderSystems/GL/src/GLSL/src/OgreGLSLExtSupport.cpp (line 65)
[ WARN] [1357093652.974973000]: OGRE EXCEPTION(2:InvalidParametersException): Named constants have not been initialised, perhaps a compile error. in GpuProgramParameters::_findNamedConstantDefinition at /tmp/ogre-HGWB/ogre_src_v1-7-4/OgreMain/src/OgreGpuProgramParams.cpp (line 1425)
[ WARN] [1357093652.975140000]: OGRE EXCEPTION(2:InvalidParametersException): Named constants have not been initialised, perhaps a compile error. in GpuProgramParameters::_findNamedConstantDefinition at /tmp/ogre-HGWB/ogre_src_v1-7-4/OgreMain/src/OgreGpuProgramParams.cpp (line 1425)
[ WARN] [1357093652.975557000]: OGRE EXCEPTION(7:InternalErrorException): Cannot compile GLSL high-level shader : rviz/include/pass_depth.geom Cannot compile GLSL high-level shader : rviz/include/pass_depth.geom ERROR: 0:1: '' : version '150' is not supported
in GLSLProgram::compile at /tmp/ogre-HGWB/ogre_src_v1-7-4/RenderSystems/GL/src/GLSL/src/OgreGLSLExtSupport.cpp (line 65)
libc++abi.dylib: terminate called throwing an exception
Abort trap: 6
```

This is the important line from the above error:

`Cannot compile GLSL high-level shader : rviz/box.geom Cannot compile GLSL high-level shader : rviz/box.geom ERROR: 0:1: '' : version '150' is not supported
ERROR: 0:18: ';' : syntax error Uniform blocks may not have identifiers in GLSL 140`

This thread seems to be relavent:

http://qt-project.org/forums/viewthread/8047