-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
glx_opengl2_example? #1194
Comments
There's none, it would be nice if you want to contribute one? (closely modelled after the existing example) |
Closing this as it won't happen by itself. If someone is interested in creating such example they can PR it. Being a variant of initializing an OpenGL context it should be easy to recreate one if you follow X11+GL tutorials. |
You can copy my X11 code (gpulib_imgui.h file), although it's for modern GL and C bindings of dear imgui: https://procedural.itch.io/lib0-engine The hardest part was clipboard pasting, if you paste more than 262145 bytes of characters in X11 you have to do that asynchronously in chunks. I couldn't care less so I just wait |
[OT: just because the issue is closed] As far as I know, on Ubuntu Linux (one of the most popular Linux distribution), X11 will be replaced at some point by another library called Wayland (see: https://wayland.freedesktop.org/). However it seems that Xorg will still be the default library in April, long term support, version (18.04 LTS) (see: https://insights.ubuntu.com/2018/01/26/bionic-beaver-18-04-lts-to-use-xorg-by-default/). The Wayland version should have a sort of backward-compatibility layer to run X programs in any case. So I think it makes sense to keep supporting X11 on Linux (even if I prefer using higher level libraries like glfw, glut or SDL2 to cross the gap). Sorry for the O.T. post. |
It suck so hard perf wise I can't believe people are serious about wayland at all. |
😄 I've never tried Wayland myself. X11 works well enough for me. |
I also want to note wayland has been 9 years in development and even its native apps still have visual glitches and jerkiness. Just give them another 9 years to sort it out. |
I am interested in the extra example if they are proven to be useful, but they'd need to be done to match the existing examples so I can keep them in sync. I'm curious however how many of our target audience would really bother using X or Wayland without a wrapper (glfw/glut/SDL as you pointed @Flix01) and actually need an example? By the way I expect in the upcoming month or so to refactor the examples/ folder and somehow find a way to separate the renderer (OpenGL3, DirectX11) from the platform (e.g. GLFW, Win32), that is to share more code. This is motivated by the fact that work on multiple viewport #1542 will put more burden on the platform layer. The difficulty will be to refactor that without losing some of the imgui examples simplicity. |
To me the point is simple: X (or Wayland) is for Linux just what the plain Windows API is for Windows. I personally prefer using wrappers also because I can write code that is more portable, but the answer to your precise question is probably: people that use Linux and don't want to link to any wrapper library (the same happens for Windows users that want a plain Window API binding).
Yes, this is the way to go if you need to add some other platform properties/services.... |
So is there going to be a GLX w/ OpenGL3+ back-end after all? "Wastland" is still a few years from been ready and mainstream. If no one, I will do it and include it as my "default" binding for MaXX Desktop. cool? |
Simple and functional extension, as nuklear do.
github.com/vurtun/nuklear/tree/master/demo/x11_opengl2
The text was updated successfully, but these errors were encountered: