Skip to content

Commit

Permalink
ome minor updates for mobile
Browse files Browse the repository at this point in the history
Update ios to include 9.1

Update OpenGL ES 2 to always require OES derivs extension and
put it first to avoid errors on some devices
  • Loading branch information
martinken committed Oct 30, 2015
1 parent 2a23c1d commit d6cc61f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 16 deletions.
3 changes: 2 additions & 1 deletion CMake/ios.device.toolchain.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ if (NOT CMAKE_OSX_SYSROOT)
iPhoneOS7.0.sdk
iPhoneOS7.1.sdk
iPhoneOS8.0.sdk
iPhoneOS9.0.sdk)
iPhoneOS9.0.sdk
iPhoneOS9.1.sdk)
if (EXISTS ${sdk_root}/${sdk} AND IS_DIRECTORY ${sdk_root}/${sdk})
set(CMAKE_OSX_SYSROOT ${sdk_root}/${sdk})
endif()
Expand Down
8 changes: 2 additions & 6 deletions CMake/ios.simulator.toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,11 @@ if (NOT CMAKE_OSX_SYSROOT)
)
foreach(sdk_root ${possible_sdk_roots})
foreach(sdk
iPhoneSimulator4.3.sdk
iPhoneSimulator5.0.sdk
iPhoneSimulator5.1.sdk
iPhoneSimulator6.0.sdk
iPhoneSimulator6.1.sdk
iPhoneSimulator7.0.sdk
iPhoneSimulator7.1.sdk
iPhoneSimulator8.0.sdk
iPhoneSimulator9.0.sdk)
iPhoneSimulator9.0.sdk
iPhoneSimulator9.1.sdk)
if (EXISTS ${sdk_root}/${sdk} AND IS_DIRECTORY ${sdk_root}/${sdk})
set(CMAKE_OSX_SYSROOT ${sdk_root}/${sdk})
endif()
Expand Down
9 changes: 0 additions & 9 deletions Rendering/OpenGL2/vtkOpenGLPolyDataMapper.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1019,15 +1019,6 @@ void vtkOpenGLPolyDataMapper::ReplaceShaderNormal(
}
else
{
if (!vtkOpenGLRenderWindow::GetContextSupportsOpenGL32())
{
vtkShaderProgram::Substitute(FSSource,"//VTK::System::Dec",
"//VTK::System::Dec\n"
"#if GL_ES==1 && __VERSION__<300\n"
"#extension GL_OES_standard_derivatives : enable\n"
"#endif\n",
false);
}
if (actor->GetProperty()->GetRepresentation() == VTK_WIREFRAME)
{
// generate a normal for lines, it will be perpendicular to the line
Expand Down
1 change: 1 addition & 0 deletions Rendering/OpenGL2/vtkOpenGLShaderCache.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ unsigned int vtkOpenGLShaderCache::ReplaceShaderValues(
#else
vtkShaderProgram::Substitute(FSSource,"//VTK::System::Dec",
"#ifdef GL_ES\n"
"#extension GL_OES_standard_derivatives : enable\n"
"#ifdef GL_FRAGMENT_PRECISION_HIGH\n"
"precision highp float;\n"
"#else\n"
Expand Down

0 comments on commit d6cc61f

Please sign in to comment.