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 - Mira

Pages: [1]
1
Graphics / sf::RenderTexture::Create() produces black screen
« on: August 11, 2011, 08:55:47 am »
Thank you very much for your reply, now I at least know for sure that I should use some temporary solution to avoid this.

Then I guess RenderWindow::Create() fails to recreate window due to the same reason, for example crappy Intel drivers or whatever. If that helps, I can say that I only tested on Ubuntu machines, and so I don't know whether other platforms have the same problem. Maybe'll test later.

Thanks again :)

2
Graphics / sf::RenderTexture::Create() produces black screen
« on: August 10, 2011, 11:36:30 pm »
Hello everyone.

I am using SFML 2.0 and I noticed that sf::RenderTexture behaves strangely in some situations.

In my game, I use RenderTexture to avoid redrawing all the tiles on the screen each frame. I draw the whole screen + some extra tiles to RenderTexture once, then I get sprite from this RenderTexture and draw it to the RenderWindow to show my level to the player as long as his/her character stays in the bounds of RenderTexture. If he crosses the bounds, I am just adding some tiles to the RenderTexture and displaying the new picture on the screen. Works like a charm.

Though not everywhere. I tested this on my desktop, which has nVidia GPU, and everything is displayed just like I expect. Recently, I tried launching my game on my laptop, and what I see there when I start the game is black screen only. Laptop has an integrated Intel video card.

I found a way to show minimal code pretty fast.
I took the entire code of pong example, and after this line:

Code: [Select]
sf::RenderWindow window(sf::VideoMode(800, 600, 32), "SFML Pong");

I just added
Code: [Select]
sf::RenderTexture texture;
texture.Create(800,600);


You may provide Create() with any arbitrary numbers.

I am not drawing this texture, not using it anywhere in this example, just using Create(), and this already shows the result. On my desktop, I can see the game, but on the laptop, only the "You lost!" text appears a few seconds after launching the game.

Also, I use RenderWindow::Create to switch video mode from my game's main menu. This works good on my desktop; on the laptop the game just silently quits on Create(), though this problem is not as critical as the previous one.

Is that expected? Or am I doing something wrong?
Both computers run Ubuntu 11.04. Thanks in advance.

3
Graphics / SFML programs don't work properly on some specific PCs
« on: March 08, 2011, 08:32:59 pm »
Greetings, ladies and gentlemen.

I have been using SFML for quite a short period of time, and i like it very much i must say. Though recently i noticed that SFML applications don't work propeply on some computers.

In particular, i noticed problems with graphics subsystem.

I have 4 computers to test SFML applications on:
(1) My main desktop PC, Windows 7 x64. Videocard is GeForce 8800. I use this PC to build programs.
(2) Another desktop PC, Windows XP x86. GeForce 5 series (5200 if my memory serves me well).
(3) A notebook, Windows 7 x64; integrated video: Intel 965 Express Chipset Family.
(4) A netbook (Asus EEE PC), Windows 7 x64; integrated video: Intel Graphics Media Accelerator 3150.
(I omit CPU details cause i don't think it really matters in this situation)

I use SFML 1.6. I compiled it with MSVS 2010 and i link statically.
I build all the projects on (1).
I built a simple SFML test game that has only a white background and a sprite which can be manipulated via arrow keys. I also used sample programs which are included into SFML 1.6 project for testing purposes.

When i launch it on (1) and (2), everything is fine. sf::RenderWindow shows up and i see the test game. All sample programs work perfectly.

However, when i try launching the test game on (3), the computer just hangs. I can't do anything at all, only move the mouse cursor; Windows doesn't react to keyboard, ctrl+alt+del doesn't work, mouse buttons don't work. The only way to finish this was to force shutdown via power button.
I also tried to launch samples from SFML 1.6 project which don't involve graphic subsystem — same thing happens again. Even sound sample.

The situation is a bit better when i launch programs on (4). The test program shows a sf::RenderWindow, but there is nothing inside. I mean, the game sprite is supposed to be there, but instead i get an effect like the program takes a screenshot of everything that is behind that window, and no matter how you interact with that window, it just leaves that "screenshot" in the same place. Resizing, maximizing makes no sense.
Then i tried launching other samples on (4). It seems that the only problem is with graphics, because, for example, when i launch pong sample, it plays a bouncing ball sound, though i don't see any game sprites at all. When i launch sound sample, everything works just fine. When i launch win32 sample, i actually see the window and a quit button, but i don't see the sprites inside the two window rectangles.

So my question is: is that supposed to be happening? As far as i can see, computers with dedicated video cards have no problems, the issue seems to be with integrated video cards. Though nothing at all works on (3), i posted this in Graphics cause i am mostly interested in the behaviour of (4).
I also tried launching dynamically linked programs on every PC, absolutely the same thing happens.

I also found that some people from this forum who have ATI videocards experience sort of similar problems and the real solution for them is to install older drivers. I also read that this would be fixed in SFML 2.0 release, but that's about ATI, and i still want to know if there is any problem with integrated videocards or not.

Or maybe i am doing something wrong?

Pages: [1]