View Issue Details

IDProjectCategoryView StatusLast Update
0030744CommunityOCCT:Visualizationpublic2021-02-20 21:21
ReporterVico Liang Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version7.4.0Fixed in Version7.4.0 
Summary0030744: Visualization, TKOpenGl - stipple line does not work on OpenGL ES 2.0
DescriptionGet the code from git master and build it with QTANGLE GLES2. The line with Aspect_TOL_DASH displayed as solid line.

The QTANGLE is from QT5.12.3, use build provided with QT installation.
Inlucde Path: Qt5.12.3\5.12.3\winrt_x64_msvc2017\include\QtANGLE
Lib path: Qt5.12.3\5.12.3\winrt_x64_msvc2017\lib
Bin path: Qt5.12.3\5.12.3\winrt_x64_msvc2017\bin
Steps To Reproduce
pload MODELING VISUALIZATION
box b 1 2 3
vclear
vinit View1
vglinfo
vdisplay -dispMode 0 b
vaxo
vfit
vaspects b -setLineType DASH
TagsNo tags attached.
Test case numberNot required

Relationships

related to 0030745 closedbugmaster Open CASCADE Visualization, TKOpenGl - fix initialization of GLES3 context 
related to 0028098 closedbugmaster Open CASCADE Visualization - errors in tests when using OpenGL ES (ANGLE) 

Activities

kgv

2019-05-25 20:33

developer   ~0084619

Try patch in branch CR30745.

Vico Liang

2019-05-26 06:28

developer   ~0084620

Last edited: 2019-05-26 11:12

Dear kgv, I tried the patch CR30745, the lines with dash style are still presented as solid. I'm using UWP, QTANGLE from QT5.12.3. The issue can be reproduced on Device Microsoft Surface and simulator of VS2017.

kgv

2019-05-26 09:02

developer   ~0084621

Last edited: 2019-05-26 09:43

Please provide sample reproducing the issue and diagnostic output about OpenGL ES version reported by application.
QTANGLE should support OpenGL ES 3.0 on Direct3D 11 capable devices.
Maybe this problem is specific to Simulator only?

Vico Liang

2019-05-26 11:42

developer   ~0084642

There is no sample to reproducing the issue since we're developing a complex product, it's not easy to make it a sample to reproduce the issue. Neither on device nor simulator works. The diagnostic output on simulator as below:

EGLVersion : 1.4 (ANGLE 2.1.0.57ea533f79a7)

EGLVendor : Google Inc. (adapter LUID: 000000000001720c)

EGLClientAPIs : OpenGL_ES

EGLExtensions : EGL_EXT_create_context_robustness EGL_ANGLE_d3d_share_handle_client_buffer EGL_ANGLE_d3d_texture_client_buffer EGL_ANGLE_surface_d3d_texture_2d_share_handle EGL_ANGLE_query_surface_pointer EGL_ANGLE_window_fixed_size EGL_ANGLE_keyed_mutex EGL_ANGLE_surface_orientation EGL_NV_post_sub_buffer EGL_KHR_create_context EGL_EXT_device_query EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_get_all_proc_addresses EGL_KHR_stream EGL_KHR_stream_consumer_gltexture EGL_NV_stream_consumer_gltexture_yuv EGL_ANGLE_flexible_surface_compatibility EGL_ANGLE_stream_producer_d3d_texture_nv12 EGL_ANGLE_create_context_webgl_compatibility EGL_CHROMIUM_create_context_bind_generates_resource EGL_EXT_pixel_format_float EGL_KHR_surfaceless_context EGL_ANGLE_display_texture_share_group EGL_ANGLE_create_context_client_arrays EGL_ANGLE_program_cache_control EGL_ANGLE_robust_resource_initialization

GLvendor : Google Inc.

GLdevice : ANGLE (Intel(R) HD Graphics 630 Direct3D11 vs_5_0 ps_5_0)

GLversion : OpenGL ES 2.0 (ANGLE 2.1.0.57ea533f79a7)

GLSLversion : OpenGL ES GLSL ES 1.00 (ANGLE 2.1.0.57ea533f79a7)

Max texture size : 16384

Max FBO dump size : 16384x16384

Max combined texture units : 32

Max MSAA samples : 0

Viewport : 1280x960

GLextensions : GL_ANGLE_client_arrays GL_ANGLE_depth_texture GL_ANGLE_framebuffer_blit GL_ANGLE_framebuffer_multisample GL_ANGLE_instanced_arrays GL_ANGLE_lossy_etc_decode GL_ANGLE_pack_reverse_row_order GL_ANGLE_program_cache_control GL_ANGLE_request_extension GL_ANGLE_robust_client_memory GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_ANGLE_texture_usage GL_ANGLE_translated_shader_source GL_CHROMIUM_bind_generates_resource GL_CHROMIUM_bind_uniform_location GL_CHROMIUM_color_buffer_float_rgb GL_CHROMIUM_color_buffer_float_rgba GL_CHROMIUM_copy_compressed_texture GL_CHROMIUM_copy_texture GL_CHROMIUM_sync_query GL_EXT_blend_minmax GL_EXT_color_buffer_half_float GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_disjoint_timer_query GL_EXT_draw_buffers GL_EXT_frag_depth GL_EXT_map_buffer_range GL_EXT_occlusion_query_boolean GL_EXT_read_format_bgra GL_EXT_robustness GL_EXT_sRGB GL_EXT_shader_texture_lod GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_s3tc_srgb GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg GL_EXT_texture_storage GL_EXT_unpack_subimage GL_KHR_debug GL_NV_EGL_stream_consumer_external GL_NV_fence GL_NV_pack_subimage GL_NV_pixel_buffer_object GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth32 GL_OES_element_index_uint GL_OES_get_program_binary GL_OES_mapbuffer GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_surfaceless_context GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_array_object

ResolutionRatio : 1

kgv

2019-05-26 13:33

developer   ~0084645

What is the code initializing OpenGL ES context then?

Vico Liang

2019-05-26 14:32

developer   ~0084649

The code initialization OpenGL ES context is almost the same as QtAndroid sample.

kgv

2019-05-26 14:51

developer   ~0084650

So this is Qt that initializes OpenGL ES?

In that case, it might be required playing with QSurfaceFormat in similar way as patch for 0030745 does:
void AndroidQt::handleWindowChanged (QQuickWindow* theWin)
{
  ...
  QSurfaceFormat aGlFormat;
  aGlFormat.setVersion (3, 0);
  theWin->setFormat (aGlFormat);
}

Vico Liang

2019-05-26 17:15

developer   ~0084651

Dear kgv, It works after do it as your propose. we need to initialized OpenGL ES 3.0 explicitly. so What's the behavior if the driver don't support OpenGL 3.0? will it still work if the version lower than 3.0? Thanks for your help.

kgv

2019-05-27 10:27

developer   ~0084653

> so What's the behavior if the driver don't support OpenGL 3.0?
That will do Qt depends on Qt, but I suppose that it will initialize an OpenGL ES 2.0 as fallback, because they don't have an advanced context selector interface and provide only "hints".

What will do OCCT 3D Viewer - it will work with OpenGL ES 2.0 with limitations (like unsupported stipple lines). Deciding upon it is a critical issue for application depends on how these stipple lines are using in application - so that you may consider disallowing starting an application on older devices or emitting a warning.

It should be technically possible implementing a fallback code for stipple lines for obsolete OpenGL ES 2.0 devices. OpenGL ES 3.0 has been released in '2012, that is - 7 years ago.

Vico Liang

2019-05-27 11:41

developer   ~0084657

Last edited: 2019-05-27 11:44

>It should be technically possible implementing a fallback code for stipple lines for obsolete OpenGL ES 2.0 devices. OpenGL ES 3.0 has been released in '2012, that is - 7 years ago.
It would be great if OCCT have such fallback. Most devices should support OpenGL ES 3.0, so this may not worth to maintain compatible with obsolete devices.

Thanks for your suggestion and help.

Vico Liang

2019-06-21 17:41

developer   ~0085208

Last edited: 2019-06-21 18:28

Dear kgv,

We do have such device with OpenGL ES 2.0, the details device as below:

Device: ZenFone 6 (A601CG) (ASUS_Z002)
Manufacturer: Asus
Device type: Phone
Device language: Portuguese
CPU make: Intel
CPU model: Z2560
Native platform: x86, armeabi-v7a, armeabi
RAM (MB): 2048
Screen size: 720 × 1280
Screen density (DPI): 320
OpenGL ES version: 2.0
OS: Android 5.0

Do you think it's possible to do support on OpenGL ES 2.0?

Vico Liang

2019-07-09 06:22

developer   ~0085505

Though OpenGL ES 3.0 has been released in 2012, OpenGL ES 2.0 devices will still remain on the market for some time. The essential feature such as line type, line style should not rely on higher version than OpenGL ES 2.0.

git

2019-07-19 16:37

administrator   ~0085798

Branch CR30744 has been created by kgv.

SHA-1: 905a2a821e40720a4474ab792b21241cd64aa491


Detailed log of new commits:

Author: kgv
Date: Fri Jul 19 16:35:23 2019 +0300

    0030744: Visualization, TKOpenGl - stipple line does not work on OpenGL ES 2.0
    
    OpenGl_ShaderManager now provides fallback stipple lines GLSL code for obsolete OpenGL ES 2.0 devices.
    OpenGl_Caps has been extended by flags disallowing OpenGL extensions usage
    and restricting upper OpenGL version to be used by OCCT for testing purposes.

git

2019-07-19 17:12

administrator   ~0085805

Branch CR30744 has been updated forcibly by kgv.

SHA-1: 66b229052d560d253619f3d778f1235bd3aca61d

kgv

2019-07-19 17:14

developer   ~0085806

Patch is ready for review.


Tested only on Angle OpenGL ES 2.0 implementation.
Dear Vico, please comment if you can test patch on another OpenGL ES 2.0 implementations.

git

2019-07-19 17:25

administrator   ~0085807

Branch CR30744 has been updated forcibly by kgv.

SHA-1: d3cf0649c8618641bc37280b0eb6cbb4934db171

Vico Liang

2019-07-23 10:10

developer   ~0085859

Dear kgv, I got the patch, it works well on OpenGL ES 2.0 device. Thank you for the fix.

osa

2019-07-23 10:22

developer   ~0085860

The patch was reviewed

bugmaster

2019-07-24 19:18

administrator   ~0085872

Issue was tested in framework of WEEK-30 branch

Combination -
OCCT branch : WEEK-30
master SHA - 5fb2bf558aed386d8816dae659ee11c6bf5ba0aa
5f5b1aed1c6e139bbd34314eca77ae7abcd8895c
Products branch : WEEK-30 SHA - d966496d8a7f2f30129bc3e7ddfb9e1703047d4c
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 10212.6700000002 / 10194.520000000162 [+0.18%]
Products
Total CPU difference: 10480.190000000039 / 10488.820000000036 [-0.08%]
Windows-64-VC14:
OCCT
Total CPU difference: 17629.5 / 17670.21875 [-0.23%]
Products
Total CPU difference: 12066.203125 / 12174.703125 [-0.89%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2019-07-26 06:14

administrator   ~0085878

Branch CR30744 has been updated by kgv.

SHA-1: 6ca93e7db9fc1bde68f5300fd9bd5f1fc7fd5ac9


Detailed log of new commits:

Author: kgv
Date: Fri Jul 26 06:12:45 2019 +0300

    # fetch uniform location beforehand

git

2019-07-26 06:22

administrator   ~0085879

Branch CR30744 has been updated by kgv.

SHA-1: d99a4276a872039b2766d77e7f1ba50218da4ba3


Detailed log of new commits:

Author: kgv
Date: Fri Jul 26 06:20:50 2019 +0300

    # cache line stipple uniforms locations

git

2019-07-26 06:23

administrator   ~0085880

Branch CR30744_1 has been created by kgv.

SHA-1: 4160a5424b4009504ecc2d700ef5d4f21144a940


Detailed log of new commits:

Author: kgv
Date: Fri Jul 19 16:35:23 2019 +0300

    0030744: Visualization, TKOpenGl - stipple line does not work on OpenGL ES 2.0
    
    OpenGl_ShaderManager now provides fallback stipple lines GLSL code for obsolete OpenGL ES 2.0 devices.
    OpenGl_Caps has been extended by flags disallowing OpenGL extensions usage
    and restricting upper OpenGL version to be used by OCCT for testing purposes.

kgv

2019-07-26 08:59

developer   ~0085881

Please take updated patch into IR.

git

2019-07-29 09:59

administrator   ~0085928

Branch CR30744_1 has been deleted by inv.

SHA-1: 4160a5424b4009504ecc2d700ef5d4f21144a940

git

2019-07-29 09:59

administrator   ~0085929

Branch CR30744 has been deleted by inv.

SHA-1: d99a4276a872039b2766d77e7f1ba50218da4ba3

Related Changesets

occt: master 59515ca6

2019-07-19 13:35:23

kgv


Committer: bugmaster Details Diff
0030744: Visualization, TKOpenGl - stipple line does not work on OpenGL ES 2.0

OpenGl_ShaderManager now provides fallback stipple lines GLSL code for obsolete OpenGL ES 2.0 devices.
OpenGl_Caps has been extended by flags disallowing OpenGL extensions usage
and restricting upper OpenGL version to be used by OCCT for testing purposes.
Affected Issues
0030744
mod - src/OpenGl/OpenGl_Caps.cxx Diff File
mod - src/OpenGl/OpenGl_Caps.hxx Diff File
mod - src/OpenGl/OpenGl_Context.cxx Diff File
mod - src/OpenGl/OpenGl_Context.hxx Diff File
mod - src/OpenGl/OpenGl_GraphicDriver.cxx Diff File
mod - src/OpenGl/OpenGl_ShaderManager.cxx Diff File
mod - src/OpenGl/OpenGl_ShaderProgram.cxx Diff File
mod - src/OpenGl/OpenGl_ShaderProgram.hxx Diff File
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff File

Issue History

Date Modified Username Field Change
2019-05-25 15:59 Vico Liang New Issue
2019-05-25 15:59 Vico Liang Assigned To => kgv
2019-05-25 19:08 kgv Relationship added related to 0030745
2019-05-25 19:39 kgv Steps to Reproduce Updated
2019-05-25 20:33 kgv Note Added: 0084619
2019-05-25 20:33 kgv Assigned To kgv => Vico Liang
2019-05-25 20:33 kgv Status new => feedback
2019-05-26 06:28 Vico Liang Note Added: 0084620
2019-05-26 06:42 Vico Liang Assigned To Vico Liang => kgv
2019-05-26 06:43 Vico Liang Status feedback => assigned
2019-05-26 09:02 kgv Note Added: 0084621
2019-05-26 09:02 kgv Assigned To kgv => Vico Liang
2019-05-26 09:02 kgv Status assigned => feedback
2019-05-26 09:06 kgv Note Edited: 0084621
2019-05-26 09:43 kgv Note Edited: 0084621
2019-05-26 11:12 Vico Liang Note Edited: 0084620
2019-05-26 11:42 Vico Liang Note Added: 0084642
2019-05-26 11:45 Vico Liang Assigned To Vico Liang => kgv
2019-05-26 11:45 Vico Liang Status feedback => assigned
2019-05-26 13:33 kgv Note Added: 0084645
2019-05-26 14:32 Vico Liang Note Added: 0084649
2019-05-26 14:51 kgv Note Added: 0084650
2019-05-26 17:15 Vico Liang Note Added: 0084651
2019-05-27 10:27 kgv Note Added: 0084653
2019-05-27 11:41 Vico Liang Note Added: 0084657
2019-05-27 11:44 Vico Liang Note Edited: 0084657
2019-06-21 17:41 Vico Liang Note Added: 0085208
2019-06-21 18:28 Vico Liang Note Edited: 0085208
2019-07-09 06:22 Vico Liang Note Added: 0085505
2019-07-19 16:34 kgv Summary Visualization - GLES display dot line as solid line on UWP => Visualization, TKOpenGl - stipple line does not work on OpenGL ES 2.0
2019-07-19 16:37 git Note Added: 0085798
2019-07-19 17:12 git Note Added: 0085805
2019-07-19 17:14 kgv Note Added: 0085806
2019-07-19 17:14 kgv Assigned To kgv => osa
2019-07-19 17:14 kgv Status assigned => resolved
2019-07-19 17:25 git Note Added: 0085807
2019-07-23 10:10 Vico Liang Note Added: 0085859
2019-07-23 10:22 osa Note Added: 0085860
2019-07-23 10:22 osa Assigned To osa => bugmaster
2019-07-23 10:22 osa Status resolved => reviewed
2019-07-24 19:17 bugmaster Test case number => Not required
2019-07-24 19:18 bugmaster Note Added: 0085872
2019-07-24 19:18 bugmaster Status reviewed => tested
2019-07-26 06:14 git Note Added: 0085878
2019-07-26 06:22 git Note Added: 0085879
2019-07-26 06:23 git Note Added: 0085880
2019-07-26 08:59 kgv Note Added: 0085881
2019-07-28 11:02 bugmaster Changeset attached => occt master 59515ca6
2019-07-28 11:02 bugmaster Status tested => verified
2019-07-28 11:02 bugmaster Resolution open => fixed
2019-07-29 09:59 git Note Added: 0085928
2019-07-29 09:59 git Note Added: 0085929
2021-02-20 21:21 kgv Relationship added related to 0028098