Commit 0ed90343 authored by Ken Martin's avatar Ken Martin Committed by Kitware Robot

Merge topic 'es2_fix_gl_version'

9dad3d8b fix for missing define on OpenGL ES2
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !1247
parents 936465e3 9dad3d8b
......@@ -565,13 +565,15 @@ void vtkOpenGLRenderWindow::InitializeTextureInternalFormats()
void vtkOpenGLRenderWindow::GetOpenGLVersion(int &major, int &minor)
{
int glMajorVersion = 0;
int glMajorVersion = 2;
int glMinorVersion = 0;
if (this->Initialized)
{
#if GL_ES_VERSION_2_0 != 1 || GL_ES_VERSION_3_0 == 1
glGetIntegerv(GL_MAJOR_VERSION, & glMajorVersion);
glGetIntegerv(GL_MINOR_VERSION, & glMinorVersion);
#endif
}
major = glMinorVersion;
......@@ -1891,9 +1893,6 @@ int vtkOpenGLRenderWindow::CreateHardwareOffScreenBuffers(int width, int height,
int glMajorVersion = 2;
#if GL_ES_VERSION_2_0 != 1
glGetIntegerv(GL_MAJOR_VERSION, & glMajorVersion);
#endif
// test for FBO support
#if GL_ES_VERSION_2_0 != 1
if (glMajorVersion < 3 &&
!glewIsSupported("GL_EXT_framebuffer_object") &&
!glewIsSupported("GL_ARB_framebuffer_object"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment