16
Graphics / Re: Is there a way to create a sprite containing multiple other textures?
« on: May 18, 2020, 11:20:14 pm »
Ahhh, excellent. I was hoping it would be something simple. Than you kindly.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
You can have a vector of any movable or copiable type. A common issue, is that a std::vector may relocate its elements in memory when growing, which will result in undefined behaviour if you have sf::Sprite instances pointing to these textures.
If you have a specific issue with a vector of sf::Texture then describe it more precisely, otherwise then just experiment and see by yourself
If it crashes on that specific line, then you should definitely be able to get some basic information with your debugger. The call stack (ie. where it crashes inside SFML) would be very helpful.
But as I said, such crashes on apparently valid code often occur because of environment issues. Are you 100% sure that the SFML release that you downloaded was compiled with the exact same compiler version as your application? If you're not sure, you can also recompile SFML yourself.
So what you say is that your code doesn't even start? From your first message I understood that it was working, and suddenly crashed on some code that you added to draw text.
Code that doesn't start (ie. nothing shows in the debugger) might be caused by a missing DLL.
Quote1. Process terminated with status -1073741510 (0 minute(s), 5 second(s))Nothing in stdout/stderr?Quote2. Debugger doesn't do or say anything except "finsihed with status 1"Probably because you don't know how to use it
That would be something to learn in priority.Quote3. ?Typically, running a debug build that links to release SFML libraries can lead to such crashes.QuoteWindows 7 64 bit/Codeblocks 17.12/MinGW compiler/sfml 2.5.1Make sure that your version of MinGW exactly matches the one that SFML was compiled with (it's clearly mentioned on the download page).
1. Check the console output
2. Use a debugger, to figure out at least where it crashes
3. Check your build configuration (no debug/release mix)
4. Post details about your environment (OS, compiler, version of SFML)
Thank you.