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

Pages: [1]
1
Graphics / Re: Crash when using high character size on text
« on: September 21, 2017, 04:56:05 pm »
Yeah, that worked, thanks.

2
Graphics / Crash when using high character size on text
« on: September 21, 2017, 03:57:01 pm »
My game allows the user to zoom out indefinitely (it's a gravity simulation, with text displayed below each planet), and when doing so the game takes longer and longer to start rendering each time the user zooms out, until it eventually crashes with a std::bad_alloc exception. Once the view actually zooms out, the lag stops until you try to zoom out again.

Offending code:

(click to show/hide)

The camera just holds a view, a float (zoom), and methods to change the zoom, move the camera, and return the zoom.

If text is not being rendered, it works perfectly with no lag when zooming. There's also no lag when zooming in, zooming back out after zooming in does not lag, even if it lagged to zoom out to that size the first time.

Pages: [1]