ocornut / imgui_test_engine

Dear ImGui Automation Engine & Test Suite
425 stars 48 forks source link

Omit GL_FRAMEBUFFER_SRGB glEnable/Disable given IMGUI_APP_GLFW_GL3 on non-ES2/3 systems #2

Closed jacobfriedman closed 1 year ago

jacobfriedman commented 1 year ago

GLES doesn't use GL_FRAMEBUFFER_SRGB (apparently it's auto-converted). Screencapture works with this condition implemented given IMGUI_APP_GLFW_GL3 & IMGUI_IMPL_OPENGL_ES3. I am yet to run videocapture.

imgui_impl_opengl3_loader.h:344-351, definition for non-GL3.

#endif /* GL_VERSION_2_0 */
#ifndef GL_VERSION_3_0
typedef khronos_uint16_t GLhalf;
#define GL_MAJOR_VERSION                  0x821B
#define GL_MINOR_VERSION                  0x821C
#define GL_NUM_EXTENSIONS                 0x821D
#define GL_FRAMEBUFFER_SRGB               0x8DB9
#define GL_VERTEX_ARRAY_BINDING           0x85B5

gl3.h in GLES3 doesn't include GL_FRAMEBUFFER_SRGB either.

jacobfriedman commented 1 year ago

If I can get ffmpeg recording in the next 24-48 hours I'll post the outcome here.

jacobfriedman commented 1 year ago

Works perfectly: https://user-images.githubusercontent.com/697310/202799765-5b38ee87-2b5e-47e6-8bc8-185919740736.mp4

ocornut commented 1 year ago

Thank you, I can’t merge now from web interface as an edit is needed (there’s an extra space) but i’ll merge on monday unless you push that change beforr.

jacobfriedman commented 1 year ago

Done. HAGW