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

Pages: [1]
1
Graphics / Re: RenderWindow default constructor
« on: February 13, 2018, 12:02:33 am »
Thanks, this works.

int main() {
  sf::RenderWindow MainRenderWindow;
  MainRenderWindow.create(sf::VideoMode(800, 600), "my game");
}

2
Graphics / RenderWindow default constructor
« on: February 12, 2018, 11:04:15 pm »
Hello. Simple question from noob. Tried to compile example project, everything looks OK:

int main()
{
  sf::RenderWindow MainRenderWindow((sf::VideoMode(800, 600), "my game");
  <skipped>
}

Changed a little:

sf::RenderWindow MainRenderWindow;
int main()
{
   MainRenderWindow.create(sf::VideoMode(800, 600), "my game");
}

It's crashed before entering main() function. I think it's crashed here:

void GlContext::initResource()
{
    Lock lock(mutex); <----- NULL value

So... If the default constructor crashes, may be better to delete it?
My config: VS 2017, SFML 2.4.2, build x64 Debug

Pages: [1]
anything