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

Author Topic: sf::Sprite output as text -> weird behavior (possible Bug)  (Read 1079 times)

0 Members and 1 Guest are viewing this topic.

Jamedon

  • Newbie
  • *
  • Posts: 2
    • View Profile
sf::Sprite output as text -> weird behavior (possible Bug)
« on: March 05, 2014, 08:49:37 pm »
Hello,

I found a weird behavior of the sf::Sprite class.
It seems that the Image is rendered to the console (somehow ???).

The Code
#include <iostream>
#include <SFML/Graphics.hpp>

int main()
{
        sf::Texture tex;
        sf::Sprite spr;

        if (!tex.loadFromFile("sfml.png"))
        {
                std::cout << "Not loaded" << std::endl;
                std::cin.get();
                return EXIT_FAILURE;
        }
        spr.setTexture(tex);
        std::cin.get();

        return EXIT_SUCCESS;
}

my SFML propery sheet:
http://pastebin.com/7kMbJsgP

the bug:

(The rest of the console output is not interesting, there are just random signs)

OS: Win 8.1
Compiler: Visual C++ Express 2013
Antivirus was deactivated

Thanks in advance :)
Jamedon

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: sf::Sprite output as text -> weird behavior (possible Bug)
« Reply #1 on: March 05, 2014, 08:52:36 pm »
This is the classic issue of mixing debug/release or even using libs that weren't compiled for your current compiler. Check that you aren't mixing debug/release builds and that SFML was built with your compiler.  ;)
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

Jamedon

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: sf::Sprite output as text -> weird behavior (possible Bug)
« Reply #2 on: March 05, 2014, 08:56:56 pm »
This is the classic issue of mixing debug/release

Gosh, that was dumb from me ;D

thanks (also for the quick answer) :)

 

anything