mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-04 10:07:58 +00:00
Problem using GLEW #1576
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#1576
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?
Hello,
I'm trying to compile the opengl3 example with glew, but
ImGui_ImplGlfwGL3_NewFrame();keep give me segmentation fault core dumped. i don't know what's wrong.here is the full code: https://hastebin.com/zogobayexi.cpp ( i have changed only the headers name and gl3wInit() to glewInit() ).
and here is the makeifile: https://hastebin.com/facidepodu.rb
I've been trying to fix it for a whole day, i don't what to do, and i really want to start a project of mine with imgui ...
Please provide a callstack, there's no way we can magically guess what is happening.
Does the stock unmodified example using gl3w works?
Has your copy of
imgui_impl_glfw_gl3.cppmodified to also use glew and not gl3w?gl3w and glew tasks are to retrieve OpenGL function pointers, a mismatch/lack of initialization here is likely to give you NULL function pointers.
i modified only the main.cpp file.
imgui_impl_glfw_gl3.cppremain unchanged, except<GL/gl3w.h>has been changed to<GL/glew.h>.Please provide a callstack.
Does the stock unmodified example using gl3w works?
the example works fine.
backtrace:
Program received signal SIGSEGV, Segmentation fault.0x0000000000000000 in ?? ()(gdb) bt#0 0x0000000000000000 in ?? ()#1 0x000000000040629c in ImGui_ImplGlfwGL3_CreateDeviceObjects() ()#2 0x000000000040670a in ImGui_ImplGlfwGL3_NewFrame() ()#3 0x0000000000405366 in main ()You can compile with -g and possibly other settings to get a more readable callstack.
I compiled with -Wall and -g
Program received signal SIGSEGV, Segmentation fault.0x0000000000000000 in ?? ()(gdb) bt#0 0x0000000000000000 in ?? ()#1 0x000000000040629c in ImGui_ImplGlfwGL3_CreateDeviceObjects ()at lib/imgui_impl_glfw_gl3.cpp:265#2 0x000000000040670a in ImGui_ImplGlfwGL3_NewFrame ()at lib/imgui_impl_glfw_gl3.cpp:367#3 0x0000000000405366 in main () at main.cpp:64Then maybe use a debugger to figure out what's wrong (where it crashes)
But it most likely crash because some of the GL function pointers are pointing to zero, something to do with your gl3w/glew setup and not a problem with the actual GL code.
lol, i managed to get it working by activating the experimental version of glew.
glewExperimental = true;before initalizing glew.
Problem solved then!