Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDL_OPENGL3] : possible regression #2919

Closed
RobertoMalatesta opened this issue Dec 5, 2019 · 3 comments
Closed

[SDL_OPENGL3] : possible regression #2919

RobertoMalatesta opened this issue Dec 5, 2019 · 3 comments

Comments

@RobertoMalatesta
Copy link

Version/Branch of Dear ImGui:

Version: 1.75
Branch: master

Back-end/Renderer/Compiler/OS

Operating System: Ubuntu Server 18.04

My Issue/Question:
Out of the box example_sdl_opengl3 does not compile anymore.

Screenshots/Video

image

Comments
If we already have SDL2, is glew still necessary ??

--R

@ebachard
Copy link

ebachard commented Dec 6, 2019

Hello,

I had the same issue, but fortunaly, I was aware. Something changed recently, indeed,but the issue is not that big : you can choose an OpenGL loader between gl3w (internal Dear ImGui), glew, and some other, by passing a define at build time. On my side, gl3w is sufficient, and works well.

Maybe you prefer patch language ? ;-)

diff --git a/examples/example_sdl_opengl3/Makefile b/examples/example_sdl_opengl3/Makefile
index 9e84df92..0792d16a 100644
--- a/examples/example_sdl_opengl3/Makefile
+++ b/examples/example_sdl_opengl3/Makefile
@@ -22,7 +22,7 @@ OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
 UNAME_S := $(shell uname -s)
 
 CXXFLAGS = -I../ -I../../
-CXXFLAGS += -g -Wall -Wformat
+CXXFLAGS += -g -Wall -Wformat  -DIMGUI_IMPL_OPENGL_LOADER_GL3W
 LIBS =
 
 ##---------------------------------------------------------------------

HTH

--
qɔᴉɹə

Auteur d'OOoLight et OOo4Kids
L'association EducOOo : http://www.educoo.org (dérivé d'OpenOffice)

https://framagit.org/ericb/miniDart (logiciel Handball)

@ocornut
Copy link
Owner

ocornut commented Dec 6, 2019

Looks like a regression added by #2798 in case the system paths has access to Glew we have a mismatch between the Makefile linking intent and the auto-detected includes.
Makes #2798 a little less attractive :(
Fixed now!

@ocornut ocornut closed this as completed Dec 6, 2019
@ocornut ocornut added the opengl label Dec 6, 2019
ocornut added a commit that referenced this issue Dec 6, 2019
…le to match linking settings

(otherwise if another loader such as Glew is accessible, the opengl3 backend might automatically use it). [#2919, #2798]
@RobertoMalatesta
Copy link
Author

Hi @ebachard .

Maybe you prefer patch language ? ;-)

?? No need of it.

I tend to avoid unneeded dependencies that foster complexity.

An internal custom loader will suffice, be leaner, more portable and under the project control.

Example:

https://github.com/ApoorvaJ/Papaya/blob/3808e39b0f45d4ca4972621c847586e4060c042a/src/libs/gl_lite.h

--R

martty pushed a commit to martty/imgui that referenced this issue Dec 7, 2019
…le to match linking settings

(otherwise if another loader such as Glew is accessible, the opengl3 backend might automatically use it). [ocornut#2919, ocornut#2798]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants