Skip to content
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

how to load the image in (Qt)qrc file by osgDB::readImageFile(const std::string &) #1312

Closed
shaozhihua opened this issue Mar 14, 2024 · 1 comment

Comments

@shaozhihua
Copy link

I called the function "osg::Image* readImageFile(const std::string& filename)" in Qt programe;
but I found that this function can not load qrc url,
I search the solution on internet,I found this:
https://osg-users.openscenegraph.narkive.com/LxqDeVJT/qt-resouce-and-osgdb-readimagefile
it is the solution in ten years ago,not today. I guess.
so I hope someone who can help me out from this question..
thank you very much!

OS: Windows11
Qt Version: Qt5.15.2
Compiler: MSVC2019
OsgVersion: 3.6.5
MyMood: confused
Lunch: Noodles

@robertosfield
Copy link
Collaborator

The OSG is not designed to directly support this, if you want to do it then you are outside the core functionality and will have to try novel approaches, if the above approach doesn't work then perhaps just load the image via Qt then copy the data across to an osg::Image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants