At first, sorry for my bad english. I hope someone understand me.
Here is a little test-code:
#include <iostream>
#include <SFML/Graphics.hpp>
int main( int argc, char **argv )
{
sf::RenderWindow App;
sf::String str ( " Test " );
App.Create( sf::VideoMode::GetDesktopMode(), "Test", sf::Style::Close );
while ( true ) {
App.Draw ( str );
App.Display();
App.Clear();
}
}
It draws a string in the left upper corner and should look like this:
Allright? Good. Now my problem. I extend the code to this:
#include <iostream>
#include <SFML/Graphics.hpp>
int main( int argc, char **argv )
{
sf::RenderWindow App;
sf::Image img;
if ( !img.LoadFromFile ( "test.png" ) ) {
return false;
}
sf::String str ( " Test " );
App.Create( sf::VideoMode::GetDesktopMode(), "Test", sf::Style::Close );
while ( true ) {
App.Draw ( str );
App.Display();
App.Clear();
}
}
Annotation:
$ file test.png
test.png: PNG image data, 50 x 50, 8-bit/color RGB, non-interlaced
And now it looks like shit:
In my opinion, the code is right. Whats wrong here?
Btw. if I instantiate the sf::String first, then it looks like picture 1 - all right. But something goes definitive wrong. Any idea?
I use Gentoo Linux. My tested sfml versions are: 1.4, trunk svn und brunch 2.0 svn
EDIT 1: With the svn version i get this error message:
Failed to create image, its internal size is too high (300x230)
Its an texturesize ore somesthing like that? OpenGL? But 300x230? I have a NVidia GeForce 9600M GT and the newest stable driver -> 180.29