You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added a macro - "#define IMGUI_IMPL_OPENGL_USE_TEXTURE_2D_ARRAY 1" to switch texture to Array Texture (GL_TEXTURE_2D_ARRAY).
It works fine but the current OpenGL 3 backend code contains GLSL version 120 (OpenGL 2.1) code should not presented in OpenGL 3 core profile, it cannot promise to support Array Texture feature, so I don't know how to deal it.
The GLSL 120 code might be related with the issue - #1513
Your backend is actually misnamed and should work with 2.x (as per #1900, in particular #1900 (comment))
Up to you how to want to support this. I suppose users of IMGUI_IMPL_OPENGL_USE_TEXTURE_2D_ARRAY won't use 2.X anyway. Either way I don't think we would merge a PR like that into the official backend, seems unnecessary. As highlighted in #3198 if you want to render your own stuff from texture array use ImDrawList callback to temporarily change the state of the renderer.
Got it, I will try to workaround it by the callback solution.
Other possible solution to me:
Just Copy/Blit single layer of GL_TEXTURE_2D_ARRAY array texture into a GL_TEXTURE_2D texture, but it need additional cost (GPU/VRAM) to copy the texture and determine when to release the copied texture (become non-immediate-mode style).
Use glTextureView but it requires OpenGL 4.3, so it cannot be used it in WebGL 2.
Version: 1.87
Branch: docking
Backend: imgui_impl_opengl3.cpp
Array Texture:
https://www.khronos.org/opengl/wiki/Array_Texture
I added a macro - "#define IMGUI_IMPL_OPENGL_USE_TEXTURE_2D_ARRAY 1" to switch texture to Array Texture (GL_TEXTURE_2D_ARRAY).
It works fine but the current OpenGL 3 backend code contains GLSL version 120 (OpenGL 2.1) code should not presented in OpenGL 3 core profile, it cannot promise to support Array Texture feature, so I don't know how to deal it.
The GLSL 120 code might be related with the issue - #1513
Other related issue - #3198
Does anyone can help ?
My changes:
changes.patch.txt
The text was updated successfully, but these errors were encountered: