Hi,
I get an error when i click CLOSE button of window of my game.
Line of code that get error (WglContext):
// Destroy the window if we own it
if (myWindow && myOwnsWindow)
DestroyWindow(myWindow);
Main file:
#include <SFML/System.hpp>
#include <iostream>
#include "Planet.h"
#include "GameObjects.h"
int main()
{
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "Solo Defender");
sf::Clock Clock;
Planet *planet = new Planet();
while (App.IsOpened())
{
sf::Event Event;
while (App.GetEvent(Event))
{
// Close window : exit
if (Event.Type == sf::Event::Closed)
App.Close();
}
App.Clear();
App.Draw(planet->sprite);
App.Display();
}
return EXIT_SUCCESS;
}
What can be?