The only limit is the amount of RAM that your graphics card has. But you shouldn't need so many render-images, what do you do with them?
Well, I actually only have two. One for regular (deferred) rendering (in order to apply full-screen shaders to the scene) and one for my light/shadow map (which is just drawn on top of the regular RenderImage using multiplicative blending).
But I've just now tried to implement a minimal case to reproduce the problem, and it even occurs with just one RenderImage:
#include <sfml/window.hpp>
#include <sfml/graphics.hpp>
int main()
{
sf::RenderWindow app(sf::VideoMode(800,600,32),"renderimage");
sf::RenderImage r1;
r1.Create(800,600);
sf::Image i;
i.LoadFromFile("Data/Sprites/test.png");
sf::Sprite spr1(i,sf::Vector2f(0,0));
spr1.Resize(800,600);
sf::Sprite everything;
while(app.IsOpened())
{
sf::Event e;
while(app.PollEvent(e))
{
switch(e.Type)
{
case sf::Event::Closed:
app.Close();
break;
}
}
app.Clear();
r1.Clear();
r1.Draw(spr1);
r1.Display();
everything.SetImage(r1.GetImage());
app.Draw(everything);
app.Display();
}
return 0;
}
Produces the same mad flickering. But that doesn't make sense to me, since I pretty much do exactly the same in my engine and it only produces flickering once I add in clearing/drawing/displaying of a second renderimage.
By the way, this works fine and shows the sprite in question:
#include <sfml/window.hpp>
#include <sfml/graphics.hpp>
int main()
{
sf::RenderWindow app(sf::VideoMode(800,600,32),"renderimage");
sf::RenderImage r1;
r1.Create(800,600);
sf::Image i;
i.LoadFromFile("Data/Sprites/test.png");
sf::Sprite spr1(i,sf::Vector2f(0,0));
spr1.Resize(800,600);
sf::Sprite everything;
while(app.IsOpened())
{
sf::Event e;
while(app.PollEvent(e))
{
switch(e.Type)
{
case sf::Event::Closed:
app.Close();
break;
}
}
app.Clear();
app.Draw(spr1);
app.Display();
}
return 0;
}
I actually might post the relevant code of my renderer, but I'm not sure what good it will do.