mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-01 05:10:41 +00:00
OpenGL3 Example code not running | Linux x64 #3507
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#3507
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?
Hi,
I just found out about this awesome library from you tube, and i wanted to give it a try to check whether it fulfills my requirements.
So i downloaded this imgui c++ library with
git clonecommand and placed the folder on the desktop.Then first i thing i did was to read official and unofficial documentation for installation and integration purpose.
It took me 2 days to simply just run the example, and trying all of them one by one finally SDL2 + OpenGL2 (example_sdl_opengl2) ran successfully.
What i did is simply copy and past the command from readme file and that's it.
But SDL + OpenGL3 (example_sdl_opengl3) example does not work.
As stated above i also copy pasted command from readme.
Original:
c++sdl2-config --cflags-I .. -I ../.. -I ../libs/gl3w main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl3.cpp ../../imgui*.cpp ../libs/gl3w/GL/gl3w.csdl2-config --libs-lGL -ldlcommand i ran:
sudo g++sdl2-config --cflags-I .. -I ../.. -I ../libs/gl3w main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl3.cpp ../../imgui*.cpp ../libs/gl3w/GL/gl3w.csdl2-config --libs-lGL -ldlI found out that each of that examples required proper dependency and Os environment setup in order to run.
So i install all related libs as per my understanding.
Here is the list of
libs installed in my systemdebian10 x64:At first it gave me lots of errors as follows:
But this was resolved by simply adding one command:
-lGLEWin capital letters , in small letter it won't work!!!
So new command look like:
$ sudo g++sdl2-config --cflags-I .. -I ../.. -I ../libs/gl3w main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl3.cpp ../../imgui*.cpp ../libs/gl3w/GL/gl3w.csdl2-config --libs-lGL -ldl -lGLEWNow output file was generated sucessfully!
./a.out
but in output it just flashes the screen and closes with one error as stated below:
i know there is some silly mistake i done as non CS guy, probably some linking mechanism which i dont understand, but consider me i can copy past command and run the program then later on i twick origional code untill it fulfills my requirements.
It would be great if outbox running code support for LINUX will be given, so i can use this in my realtime machinevision applications. Like: sample code with VSCode IDE or other which simply just run if i follow certain steps.
Thank You,
Did you try just running
makein that folder?Sorry for the inconvenience,
I was testing inside virtualbox (
V6.1.14).I think its VirtualBox problem or limitation that it only supports up to OpenGL 2.1.
Actual version in my virtual machine is
OpenGL 2.1 Mesa 18.3.6.My main or host OS is windows10 with
OpenGL 4.3(Graphics: Intel iGPU -HD 4600 V20.19.15.4531)I explored both files
main.cpp(opengl3 example),imgui_impl_opengl3.cpp and .h.line by line.Also try to enforce
gl3wstandalone lib (gl3w.cpp and .hlibs) from imconfig.h but its not working.Here is the O/P of
makecommand inside example folder.Terminal O/P:
Same problem...
So, I guess its hardware limitation (VirtualBox), I will final update once I test it on actual O.S as dual boot.
Thank you for your support.