Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

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.


Messages - Tess

Pages: [1]
1
After looking into it further. I was having any predefined sf::Color become 0,0,0,0 regardless of what it was.
so sf::Color test = sf::Color::Black would have values (r=0,g=0,b=0,a=0)
BUT only in places where I happened to be initalising before main().

To test I put, above main(), this:
Quote
sf::Color mainTest = sf::Color::Black; //results in 0,0,0,0
sf::Color mainTest2 = sf::Color(0, 0, 0); //results in 0,0,0,255

And I knew about these kind of ordering issues, but I'd never expect it with predefined values of something as simple a a color. And it was extremely weird that it would work in release but not in debug.

My confusion now is that I don't know what bad assumption I made, I thought the two lines I wrote above would always be identical, and yet they are not?

Anyway hope this helps someone else avoid a headache from this!

2
Because I've been struggling to understand for hours why text would display in "Release" and not at all in "Debug" configs (in Visual Studio, static linked SFML 2.6.1).
And it only showed up when instead of sf::Color::Black, I used sf::Color(0,0,0,255). I just wanted it to be in black to show up clearer and I didn't think that would cause problems.
Removing the set color line did make it display in white, but also testing other colors and blue had the same problem. 0 alpha in debug, 255 in release.

So, whilst for my game this is now fixed, I have a headache and i'm still not sure if I configured something wrong to have that happen?

Pages: [1]
anything