mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-01 05:10:41 +00:00
What's the deal with the GL3W.h header instead of GLEW.h #880
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#880
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm really confused about this. Are these the same libraries? The OpenGL tutorial I followed used GLEW instead of GL3W, and on the official OpenGL website GLEW is available in the libraries downloads.
imgui_impl_glfw.cpp crashes for me because I hadn't initialised GL3W, but I changed #include GL3W.h to #include GLEW.h and it works fine now. I'm not using an old version of OpenGL, it's relatively new, 3.2, and it's definitely not fixed function pipeline. I noticed in the OpenGL2 renderer example it just includes GLFW.
Thanks.
It's just a OpenGL function loader, there isn't really anything special about it. GLEW has some problems with newer versions of GL and it can't correctly create a core profile. Creating GL contexts changed at some point and GLEW was never updated, as far as I know, or never correctly updated to match. Anyways it's just an example, you don't have to follow it. I use an OpenGL loader called GLAD, and it's worked for me so far.
Keep in mind gl3w loads core functions only if you decide to go with that.
You should probably read this if you want to know more about what these libraries are and the differences between them.
I personally recommend glad as well, it's lightweight and fully customizable to allow loading only what you really need.
Glew is still used in a lot of tutorials but has been getting less and less popular because of some long standing bugs, being very slow and not correctly supporting core contexts.
OpenGL requiring those things is quite a unfortunate mess!
I'm just using GL3W for those example because it is simpler and smaller, but as mentioned you probably want to keep using whatever you are already using.
I will add commentary to the Examples to clarify that.
Added those comments now. Thanks for the links. Glad looks quite better.
For those examples I like that gl3w has all its files in the same folder, whereas Glad spans multiple folders, and it's not really worth looking into a change seeing that examples/ are already a pain to maintain, but I'll keep it in mind.
FYI :) https://github.com/gingerBill/gl3w-Single-File
I had an issue with using GL extensions when I used the imgui-provided gl3w. If you build your own version of gl3w, you can use the flag
./gl3w_gen.py --extto get access to the extensions.