LaurentGomila/SFML — Issue #172: Quad render issues
Author: RevenantX
Created: 2012-02-12 19:16:50+00:00
State: open

I have some issues when using opengl render
minimal code:

```c++
#include
#include

int main()
{
sf::RenderWindow App(sf::VideoMode(800, 600), "SFML window");

sf::Texture texture;
texture.LoadFromFile("grass.png");

float width = texture.GetWidth();
float height= texture.GetHeight();

while (App.IsOpen())
{
sf::Event Event;
while (App.PollEvent(Event))
{
if (Event.Type == sf::Event::Closed)
App.Close();
}

App.Clear();

texture.Bind();
glBegin(GL_QUADS);
glTexCoord2i(0, 1); glVertex3f(0.0f, 0.0f, 0.0f);
glTexCoord2i(0, 0); glVertex3f(0.0f, height, 0.0f);
glTexCoord2i(1, 0); glVertex3f(width, height, 0.0f);
glTexCoord2i(1, 1); glVertex3f(width, 0.0f, 0.0f);
glEnd();

App.Display();
}

return EXIT_SUCCESS;
}
```
Result:
http://rghost.ru/36488751/image.png
grass.png file:
http://rghost.ru/36488759/image.png