Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0030600Open CASCADE[OCCT] OCCT:Visualizationpublic2019-03-22 14:202019-11-21 17:54
Assigned Tomzernova 
PrioritynormalSeverityintegration request 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.5.0*Fixed in Version 
Summary0030600: Visualization, TKOpenGl - include GLES3/gl3.h instead of GLES2/gl2.h
DescriptionOpenGl_GlFunctions.hxx currently includes GLES2/gl2.h header for compatibility with old Android/iOS devices. This leads to extra bloating re-definitions for using GLES3 functionality.

// include main OpenGL header provided with system
#if defined(__APPLE__)
  #import <TargetConditionals.h>
    #include <OpenGLES/ES2/gl.h>
    #include <OpenGL/gl.h>
  #define __X_GL_H // prevent chaotic gl.h inclusions to avoid compile errors
#elif defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__)
  #if defined(_WIN32)
    // Angle OpenGL ES headers do not define function prototypes even for core functions,
    // however OCCT is expected to be linked against libGLESv2
  #include <GLES2/gl2.h>
  //#include <GLES3/gl3.h>
  #include <GL/gl.h>

It is proposed to use GLES3/gl3.h and remove extra macros, but at the same time remain linking to, so that only header files will be actually needed for building.
This should work transparently for newer Android NDK (like android-ndk-r16b), where header files are now shared across all versions, but on older NDKs (like android-ndk-r12), this would require building for at least Android 19+ (or hacking earlier Android headers by copying GLES3).

The same should apply to iOS target [OpenGLES/ES3/gl.h].
Note that should be also updated to try creating kEAGLRenderingAPIOpenGLES3 and then fallback to kEAGLRenderingAPIOpenGLES2:
    aGLContext = [[EAGLContext alloc] initWithAPI: kEAGLRenderingAPIOpenGLES2];
Steps To ReproduceN/A
TagsNo tags attached.
Test case number
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2019-03-22 14:20 kgv New Issue
2019-03-22 14:20 kgv Assigned To => kgv
2019-03-22 14:20 kgv Relationship added related to 0030505
2019-03-22 15:06 kgv Description Updated View Revisions
2019-09-04 18:27 kgv Target Version 7.4.0 => 7.5.0*
2019-11-18 17:16 kgv Assigned To kgv => mzernova
2019-11-18 17:16 kgv Status new => assigned

Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker