Eureka! I found it! The problem occurs only when I use a RenderImage!
Here's my test code.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SFML.Graphics;
using SFML.Window;
namespace TestSFML
{
class Program
{
static KeyCode lastKey = KeyCode.N;
static void Main(string[] args) {
VideoMode vm = new VideoMode(320, 240);
RenderWindow app = new RenderWindow(vm, "SebaTest SFML");
app.Closed += new EventHandler(app_Closed);
app.KeyPressed += new EventHandler<KeyEventArgs>(app_KeyPressed);
View view1 = new View(new FloatRect(0, 0, 160, 120));
View view2 = new View(new FloatRect(0, 0, 80, 60));
Image testImg = new Image("sprite.png");
testImg.Smooth = false;
Sprite spr = new Sprite(testImg);
Font font = new Font("ProFontWindows.ttf");
Text text = new Text("texto de prueba", font);
RenderImage surface = new RenderImage(320, 240);
surface.Draw(spr);
//surface.DefaultView.Size = new Vector2(-320,240);
//surface.SetView(surface.DefaultView);
//spr.Scale = new Vector2(-1, 1);
//spr.FlipX(true);
//surface.Draw(spr);
surface.Display();
Sprite surfaceSprite = new Sprite(surface.Image);
while(app.IsOpened()) {
app.DispatchEvents();
vm.Height = 180;
vm.Width = 320;
app.Clear(Color.Blue);
spr.Rotation = 0f;
spr.Position = new Vector2();
//app.Draw(spr);
spr.Rotation = 2.57f;
spr.Position = new Vector2(0, 10);
//app.Draw(spr);
app.Draw(surfaceSprite);
text.DisplayedString = "Ășltima tecla: " + lastKey.ToString() + "\n"
+ (int)lastKey;
app.Draw(text);
app.Display();
}
Console.WriteLine("end!");
Console.ReadKey();
}
static void app_KeyPressed(object sender, KeyEventArgs e) {
lastKey = e.Code;
}
static void app_Closed(object sender, EventArgs e) {
RenderWindow rw = (RenderWindow)sender;
rw.Close();
}
}
}
If I comment the surface creation, this works well on the netbook... otherwise, only works in the other machines.