1
Graphics / An odd problem
« on: October 20, 2011, 06:46:50 am »Quote
Which version?2010
I may just try a different compiler and environment and see how that goes.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Which version?2010
Unhandled Exception: System.AccessViolationExeption: Attempt to read or write protected memory. This is often an indication that other memory is corrupt.
at sf.RenderTarget.Clear(RenderTarget* , Color* )
at main()
at _mainCRTStartup()
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "Heavy");
sf::Image Image;
if (!Image.LoadFromFile("heavy.tga")) return EXIT_FAILURE;
sf::Sprite Sprite(Image);
Sprite.SetPosition(200.f, 100.f);
while (App.IsOpened())
{
sf::Event Event;
while (App.GetEvent(Event))
{
if (Event.Type == sf::Event::Closed)
App.Close();
}
App.Clear();
App.Draw(Sprite);
App.Display();
}
return EXIT_SUCCESS;
}