Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

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.


Messages - GreenBug

Pages: [1]
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.

2
Graphics / An odd problem
« on: October 19, 2011, 09:06:59 pm »
Sorry about that.

1.6, static, windows 7, and Microsoft's visual c++ compiler.

Hope that helps.

3
Graphics / An odd problem
« on: October 19, 2011, 07:01:58 pm »
Whenever I run my program it immediatley crashes. I have no idea why, and I get this message in the console.
 
Quote
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()


I don't think it's my code, but here it is for what it's worth.

Code: [Select]
#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;
}


Thanks for reading, and I hope someone knows what's wrong.

Pages: [1]