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 - RHilton

Pages: [1]
1
Graphics / RenderWindow.Clear() crashes
« on: November 15, 2011, 04:32:29 am »
Hello,
really new to SFML, tried to do some of the tutorials but I'm getting a runtime crash. It compiles fine.

Project information
VC 10
Console Application -> Empty Project
Additional Dependancies
sfml-window.lib;sfml-graphics.lib;sfml-system.lib
Preprocessor Definitions-
SFML_DYNAMIC;WIN32;_DEBUG;_CONSOLE;


Code: [Select]
From the tutorial.


#include <SFML/Graphics.hpp>

int main()
{
    // Create the main rendering window
    sf::RenderWindow App;
App.Create(sf::VideoMode::GetMode(0), "SFML Window", sf::Style::Fullscreen);

bool Running = true;
while (Running)
{
sf::Event event;

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

App.Clear(); // if i comment this line, i don't get the crash
   App.Display();
}
}



If i comment out the App.Clear() call it doesnt crash.
When it crashes it says the program expierenced a buffer overflow.


Any ideas?

OS is Win7 32 bit

Pages: [1]
anything