Conversation
|
Thanks a lot! This is a great contribution. I've been a bit busy to review it but I'll do it soon. |
MiguelMJ
left a comment
There was a problem hiding this comment.
I've tried to compile it and it goes well with CMake but I've had to change the -std option to use C++17 when using Makefile (and also remove -lsfml-audio, but that was my bad).
Also I had to make a small change in LightSource.cpp:15 because I guess you didn't try out the DEBUG mode (don't worry, I didn't expect it 😅 )
However, after compiling, I get the following error when trying to run the demo (both in release and debug):
demo: /home/miguelmj/Candle-SFML3/build/_deps/sfml-src/src/SFML/Graphics/VertexArray.cpp:52: sf::Vertex& sf::VertexArray::operator[](std::size_t): Assertion `index < m_vertices.size() && "Index is out of bounds"' failed.
Aborted (core dumped)
Does this happen to you? Any ideas where the bad access can be?
There was a problem hiding this comment.
This piece of README should be removed, but I'll keep it in mind to check if there's something that should be updated in the documentation.
|
I will give it a shot and see if I get the same error in the next couple days! |
|
Ah. I am indeed getting that error as well. I will see if I can figure it out! I would guess it has to do with some decisions I made when replacing sf::uint (deprecated) with std::uint_16t. I may just need to up those to 32s or something. |
…stead of 6 (one triangle vs. two)
|
Ok, demo is running! It definitely looks a little wonky, almost certainly due to the conversion from quads to triangles. We might just need to draw the triangle vertices in a different order or something? |
|
Looks like @gamepopper has also done an SFML 3 update, see here: https://github.com/gamepopper/Candle |
|
Hello! I'll be unable to review these changes for some weeks, sorry! Until I try the demo I don't know if the glitch problem is because of the triangle order (which sounds reasonable). If any progress is made along those lines, comment and I'll keep it in mind when I can review all of this. Thanks! |
This PR is an attempt to update Candle for use with SFML3. Most of the changes were minor, with the exception of refactoring sf::VertexArrays that were relying on sf::Quad (deprecated and removed) to instead use sf::PrimitiveType::Triangles.
I also updated the CMakeLists.txt file to be a more modern approach, but my Cmake knowledge is limited and I am definitely not 100% certain it's correct.