When i try loading an image i get this error.
'SFML.exe' (Win32): Unloaded 'C:\Windows\SysWOW64\atigktxx.dll' 'SFML.exe' (Win32): Loaded 'C:\Windows\SysWOW64\atigktxx.dll'. Cannot find or open the PDB file. The thread 0x2f3c has exited with code 0 (0x0). The program '[8956] SFML.exe' has exited with code 0 (0x0). |
This is my code.
#include<SFML/Graphics.hpp>
#include<iostream>
using namespace sf;
int main()
{
Texture ptex;
Sprite pimage;
ptex.loadFromFile("Player.png");
pimage.setTexture(ptex);
RenderWindow Window(VideoMode(800, 600, 32), "Displaying Images");
int px = 20;
int py = 20;
RectangleShape rect1;
rect1.setSize(Vector2f(50, 50));
rect1.setPosition(px,py);
rect1.setOutlineColor(Color::Red);
rect1.setOutlineThickness(5);
rect1.setOrigin(25,25);
RectangleShape shot;
Clock clock;
float moveSpeed = 5000.0f;
float rot = .050f;
while(Window.isOpen())
{
clock.restart();
Event Event;
Vector2i mpos = Mouse::getPosition(Window);
while(Window.pollEvent(Event))
{
if(Event.type == Event::Closed || Event.key.code == Keyboard::Escape)
Window.close();
if(Event::MouseMoved)
rect1.setPosition(mpos.x,mpos.y);
}
if(Keyboard::isKeyPressed(Keyboard::Right))
rect1.move(moveSpeed * clock.getElapsedTime().asSeconds(), 0);
if(Keyboard::isKeyPressed(Keyboard::Left))
rect1.move(-moveSpeed * clock.getElapsedTime().asSeconds(), 0);
if(Keyboard::isKeyPressed(Keyboard::Up))
rect1.move(0, -moveSpeed * clock.getElapsedTime().asSeconds());
if(Keyboard::isKeyPressed(Keyboard::Down))
rect1.move(0, moveSpeed * clock.getElapsedTime().asSeconds());
if(Keyboard::isKeyPressed(Keyboard::D))
rect1.rotate(rot);
if(Keyboard::isKeyPressed(Keyboard::A))
rect1.rotate(-rot);
Window.draw(rect1);
Window.display();
Window.clear();
}
return 0;
}