Could you please show a complete and minimal code that reproduces the problem, so that we can test it?
Sorry for the delay, i was making the Minimal Code (Complete code its a lot of source code / classes / files / blah)
Minimal Code (Timer Class its only a wrapper of sf::Clock):
This code makes the same render problem than the screenshot of the first post (but without the mini-view test)
#include <timer.h>
#include <SFML/OpenGL.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
int main(int argc, char *args[])
{
sf::RenderWindow window;
//---------------------------------
window.create(sf::VideoMode(640, 480), "Demo");
window.setFramerateLimit(60);
//---------------------------------
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glClearColor(0, 0, 0, 0);
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
window.clear();
//---------------------------------
sf::Sprite player;
sf::Texture playerTexture;
playerTexture.loadFromFile("resources/player.png");
player.setTexture(playerTexture);
player.setTextureRect(sf::IntRect(0, 0, (player.getTexture()->getSize().x / 5), player.getTexture()->getSize().y));
player.setPosition(200, 300);
sf::Sprite background;
sf::Texture backgroundTexture;
backgroundTexture.loadFromFile("resources/back.png");
background.setTexture(backgroundTexture);
sf::Font fuente;
fuente.loadFromFile("resources/arial.ttf");
//---------------------------------
bool run = true;
int msLastFrame = 0;
Timer fps;
Timer update;
while (run)
{
msLastFrame = fps.getTicks();
fps.start();
sf::Event event;
while (window.pollEvent(event))
{
if(event.type == sf::Event::Closed)
{
run = false;
}
}
//---------------------------------
window.clear();
glEnable(GL_DEPTH_TEST);
glClear(GL_DEPTH_BUFFER_BIT);
glDisable(GL_CULL_FACE);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0, 640, 480, 0, -1000.0, 1000.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
sf::Text text("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
text.setFont(fuente);
text.setCharacterSize(30);
text.setStyle(sf::Text::Regular);
text.setColor(sf::Color::Red);
window.draw(text);
window.draw(player);
window.draw(background);
window.display();
//---------------------------------
if (update.getTicks() >= 1000)
{
update.start();
}
if (fps.getTicks() < 17) //59fps
{
sleep(sf::milliseconds(17 - fps.getTicks()));
}
}
//---------------------------------
return 0;
}