
GLFW 3.3 Is Released - dmitshur
https://www.glfw.org/Version-3.3-released.html
======
klodolph
For those who wonder what GLFW is... if you want to play with OpenGL or
Vulkan, make a graphics demo, or make a game, GLFW is a library that frees you
from having to deal with the nuances of Win32/X11/etc, wrangles keyboard
inputs and other things across platforms.

It is similar to LibSDL, but is more lightweight and GPU-centric. GLFW is
designed more with greenfield projects in mind, whereas LibSDL was designed
from the beginning to help with porting existing code. (They are both
excellent libraries.)

~~~
kbenson
So, it's sort of like GLUT was? (is?) I only messed around with 3D rendering a
little back in the very early 2000's, but from what I remember, GLUT made
everything much easier.

~~~
skocznymroczny
Yes, it's kind of like GLUT, although it covers fewer functionalities. It
focuses only on abstracting the OS specific parts like keyboard/mouse input
and window/graphics context creation. GLUT also offered things like rendering
fonts, teapots and additional functionalities.

------
bryanphe
Very excited for this release! GLFW is part of the foundation for a UI
framework we're building called Revery [1] and there are several features in
3.3 that will be useful for us - transparent framebuffers, headless backend
via OSMesa (important for CI / automation), and high-DPI improvements.

GLFW takes a lot of the pain out of cross-platform GPU development, and I've
found the API simple and intuitive to work with. For those looking to play
with it - the LearnOpenGL tutorial series [2] is excellent, and uses GLFW for
managing a window and getting an OpenGL context.

Thank you maintainers for your work on it!

\- [1] Revery: [https://github.com/revery-
ui/revery](https://github.com/revery-ui/revery)

\- [2] LearnOpenGL: [https://learnopengl.com/Getting-started/Creating-a-
window](https://learnopengl.com/Getting-started/Creating-a-window)

~~~
genpfault
Sadly Mesa's software renderers seem to have topped out at OpenGL 3.3[1] :(

[1]:
[https://mesamatrix.net/#Version_OpenGL3.3-GLSL3.30](https://mesamatrix.net/#Version_OpenGL3.3-GLSL3.30)

~~~
bryanphe
Ah, that's too bad! I've been hunting for ways to get better integration tests
on CI for Revery.

Would like to have image-based verification for certain classes of tests, and
we use Azure CI pipelines - seems their VMs don't have hardware support at all
for OpenGL (on any platform).

~~~
genpfault
Eh, 3.3 Core is still pretty darn capable. 4.0+ mostly just added
tessellation/compute shaders & quality-of-life and/or AZDO[1]-style features.

[1]:
[https://en.wikipedia.org/wiki/Glossary_of_computer_graphics#...](https://en.wikipedia.org/wiki/Glossary_of_computer_graphics#azdo)

------
minxomat
Nice to see this is still in development. I wrote GLWF bindings for two
languages and it was pretty easy to grok. It's also absolutely essential if
you want to have an UI in a language without support for GUIs (like golang).
Just use the OpenGL backend for the immediate mode UI lib of your choice
(dear-imgui, nuklear, ...) and GLFW for the window setup and you're golden.

------
planteen
Excellent! I've been using GLFW_TRANSPARENT_FRAMEBUFFER for over a year, but
kept having to do builds out of Git to get support. It will be nice when this
new library trickles into Linux distros over the next year.

------
eikenberry
"GLFW is an Open Source, multi-platform library for OpenGL, OpenGL ES and
Vulkan development on the desktop. It provides a simple API for creating
windows, contexts and surfaces, receiving input and events."

------
binarycrusader
As a nice complement to GLFW, there's also bgfx which can be configured to use
GLFW:

[https://github.com/bkaradzic/bgfx](https://github.com/bkaradzic/bgfx)

------
enriquto
Can somebody explain what are the advantages of glfw over freeglut? (other
than the non-issue of "being" old)

I am using freeglut for casual opengl code, and I see no problem with it. Is
there anything that I am missing?

~~~
eropple
Back when I was doing a lot with this stuff, GLUT was effectively dead. Stuff
like MacOS HiDPI surfaces wasn't doable without going well outside of what
GLUT wanted to help you with. GLFW has been under active development over that
time period, unifying baseline OpenGL, OpenGL ES, and Vulkan stuff to build
upon.

~~~
enriquto
Indeed, GLUT is not in active development (I would not say that it is
"effectively dead" but rather that it "crystallized into a perfect form", but
I digress). However, I was asking about "freeglut", which is a different
thing, which is actively developed: last commit on 2019-03-26 dropped some
unnecessary dependencies, for example.

~~~
jandrese
I remember GLUT having some pretty significant deficiencies last time I looked
at it. I guess FreeGLUT has added support for stuff like Unicode, high-DPI
displays, etc... in the intervening years?

~~~
enriquto
I just use freeglut to open a window and throw opengl into it, in a more or
less portable way. The "gui" and "font" parts of freeglut are not really very
useful (and they are missing in glfw anyway). Thus, unicode and high-dpi
issues should be of no concern: as long as you can draw to your window and
receive user input, what else do you need? What do you mean exactly by high-
dpi "support"?

~~~
eropple
You have to explicitly opt into a Retina display context on MacOS in order to
get a window into which you can render at high DPI (2x the physical
dimensions). You cannot mimic this with transform matrices; the render target
will be rasterized at low-DPI and interpolated.

So, yes, high-DPI issues very much exist, and GLFW does the right thing.

------
floatboth
Dynamic loading of backends, i.e. supporting X11 and Wayland with the same
build (PR #1338) didn't make it :(

------
jokoon
Finally, I was waiting for this release, they fixed an annoying click event
bug on Linux.

Hard to know why this bug had to wait so long for a fix. Where are the delays
coming from?

