title: sfml generated texture is not drawn to window
body: <p>What I'm trying to do:</p>
  
  <ul>
  <li>draw a generated sf::Texture to a window</li>
  </ul>
  
  <p>Expected result:</p>
  
  <ul>
  <li>A window filling texture (in the example code: a green background)</li>
  </ul>
  
  <p>The result:</p>
  
  <ul>
  <li>A blank (black) window</li>
  </ul>
  
  <p>What I've done so far:</p>
  
  <ul>
  <li>tried loading in a texture from a file: works</li>
  <li>tried saving the generated texture to a file: works</li>
  <li>tried generating a smaller texture, within the bounds of Texture.getMaximumSize()</li>
  <li>shrinking the code down to a minimum</li>
  </ul>
  
  <p>The tools I use:</p>
  
  <ul>
  <li>OS: Kde Neon 5.10 (based on Ubuntu 16.04), Linux kernel 4.4</li>
  <li>Build system: qmake</li>
  <li>sfml version: 2.3</li>
  </ul>
  
  <p>Example code (completely stripped down, and useless in this form, but it displays the problem):</p>
  
  <pre><code>#include &lt;iostream&gt; 
  #include &lt;SFML/Graphics.hpp&gt;
  
  using namespace std;
  
  int main()
  {
      // width and height of the window
      // this will not exceed max size of texture
      uint width = 128;
      uint height = 128;
  
      // create new window
      sf::RenderWindow * window = new sf::RenderWindow(sf::VideoMode(height,width), "Mandelbrot");
  
      // create pixel array
      vector&lt;sf::Uint8&gt; * pixels = new vector&lt;sf::Uint8&gt;(height * width * 4);
  
      // fill array with collors;
      for (uint i = 0; i &lt; height*width; i++)
      {
          pixels-&gt;at(i*4 + 2) = 255;
      }
  
      // create texture
      sf::Texture * texture = new sf::Texture();
      texture-&gt;create(width,height);
      texture-&gt;update(pixels-&gt;data());
  
      // create sprite to hold the texture
      sf::Sprite * sprite = new sf::Sprite();
      sprite-&gt;setTexture(*texture);
      sprite-&gt;setTextureRect(sf::IntRect(0, 0, width, height));
  
      // draw the sprite
      window-&gt;draw(*sprite);
  
      // draw buffer to screen
      window-&gt;display();
  
      // close window on system close action
      sf::Event event;
      while (window-&gt;waitEvent(event))
      {
          if (event.type == sf::Event::Closed)
          {
              // close window
              window-&gt;close();
              return 0;
          }
      }
  
  return 1;
  }
  </code></pre>