tangrams / tangram-es

2D and 3D map renderer using OpenGL ES
MIT License
828 stars 240 forks source link

Error: GL_INVALID_ENUM at: ImGui_ImplOpenGL3_CreateFontsTexture #2070

Open Lecrapouille opened 5 years ago

Lecrapouille commented 5 years ago

in SHA1 931a12e, Debian 9.9, AMD 64-bits, g++-6 (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, When starting tangram (I exported the API key), I have this runtime error and no displayed map:

TANGRAM map.cpp:874: setup GL
ERROR hardware.cpp:51: glGetString( GL_EXTENSIONS ) returned NULL
TANGRAM hardware.cpp:77: Hardware max texture size 16384
TANGRAM hardware.cpp:78: Hardware max combined texture units 192
TANGRAM map.cpp:207: resize: 1024 x 768
TANGRAM main.cpp:28: Base URL: file:///home/qq/tangram-es/build/
GL Error: GL_INVALID_ENUM at: ImGui_ImplOpenGL3_CreateFontsTexture
WARNING sceneLoader.cpp:687: Can't find data source touch for layer touch
WARNING tileManager.cpp:204: add source osm
TANGRAM scene.cpp:481: Fetch font https://fonts.gstatic.com/s/opensans/v13/O4NhV7_qs9r9seTo7fnsVLO3LdcAZYWl9Si6vvxL-qU.woff
TANGRAM scene.cpp:481: Fetch font https://fonts.gstatic.com/s/opensans/v13/wMws1cEtxWZc6AZZIpiqWALUuEpTyoUstqEm5AMlJo4.woff
TANGRAM scene.cpp:481: Fetch font https://fonts.gstatic.com/s/montserrat/v7/zhcz-_WihjSQC0oHJ9TCYL3hpw3pgy2gAi-Ip7WPMi0.woff
TANGRAM scene.cpp:427: Fetch texture file:///home/qq/tangram-es/build/res/img/poi_icons_32.png
TANGRAM scene.cpp:312: Prefetch tiles for View: 1024.000000x768.000000 / zoom:16.000000 lon:-74.009764 lat:40.705327
TANGRAM scene.cpp:432: Received texture file:///home/qq/tangram-es/build/res/img/poi_icons_32.png
TANGRAM scene.cpp:485: Received font: https://fonts.gstatic.com/s/montserrat/v7/zhcz-_WihjSQC0oHJ9TCYL3hpw3pgy2gAi-Ip7WPMi0.woff
TANGRAM scene.cpp:485: Received font: https://fonts.gstatic.com/s/opensans/v13/O4NhV7_qs9r9seTo7fnsVLO3LdcAZYWl9Si6vvxL-qU.woff
TANGRAM scene.cpp:485: Received font: https://fonts.gstatic.com/s/opensans/v13/wMws1cEtxWZc6AZZIpiqWALUuEpTyoUstqEm5AMlJo4.woff
TANGRAM map.cpp:186: ASYNC DISPOSE OF OLD SCENE - 1
TANGRAM scene.cpp:312: Prefetch tiles for View: 1024.000000x768.000000 / zoom:16.000000 lon:-74.009764 lat:40.705327
LOADED Font: Open Sans Italic size: 16
LOADED Font: Open Sans Regular size: 16
LOADED Font: DejaVu Sans Book size: 16
GL Error: GL_INVALID_VALUE at: ImGui_ImplOpenGL3_RenderDrawData
GL Error: GL_INVALID_VALUE at: ImGui_ImplOpenGL3_RenderDrawData
GL Error: GL_INVALID_OPERATION at: ImGui_ImplOpenGL3_RenderDrawData
GL Error: GL_INVALID_OPERATION at: ImGui_ImplOpenGL3_RenderDrawData
matteblair commented 5 years ago

Hmm that's an interesting set of errors. It's not obvious to me what the issue could be. @Lecrapouille what OpenGL driver are you using?

Lecrapouille commented 5 years ago

My config: OpenGL version: 4.3 (Core Profile) Mesa 13.0.6 GLSL version: 4.30 I have a fresh Debian 9.9 updated. Mesa 13.06 is a little old (2 years old) but this is not the problem

When I posted issue https://github.com/tangrams/tangram-es/issues/1980 It worked (I mean I saw the map). Now I just reverted to this commit d1e2f787ae01e3d7294673af26061527f17bc41a and its working back.

I'll try to do a git bisect. I'll give feedback later.

Lecrapouille commented 5 years ago

Sorry, I tried again and the bug disappeared. Since yesterday I have rebooted my computer. Probably the bug produced because I tried an experimental GitHub project messing my GPU or when I added the API key for the first time.

Lecrapouille commented 5 years ago

PS: I understand now what happened: I tried another github application and for using it, I add to export:

export MESA_GL_VERSION_OVERRIDE=4.5
export MESA_GLSL_VERSION_OVERRIDE=450

before launching it. Then I did not use a new terminal when I tried tangram-es. So the bug can be reproduced (of course in a new terminal these variables are no longer set and tangram workes well).

Lecrapouille commented 5 years ago

I reopen it, in case your are interesting by it, else feel free to close it.