Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 13 Jul 2000
Offline Last Active Nov 19 2012 10:53 AM

Posts I've Made

In Topic: Memory Leak?

16 July 2012 - 06:30 AM

Anyway, wouldn't it be easier to just call the clear function to clear all of the elements in the vector? I tried it and I'm not getting the debug assertion.

I suspect the problem is in the calling function - it's probably looping over the length of the array and calling removeEmitter for each index - which won't work correctly because erasing an element from the vector will make it shorter, shifting the other elements up by one..


In Topic: Swapchain->Present locks up

10 January 2012 - 07:36 AM

SwapChain::Present exhibits asynchronous behaviour and queues blit/flip operations rather than performing them immediately. Depending on your swap mode (you seem to be using blit rather than flip) the rate at which the queue gets processed with vsync disabled will vary, as will the maximum length of the queue.

You're submitting frames at roughly 200/s and they're being consumed by the device at about 70/s; so it's most likely that you're saturating the presentation queue and the Present function is then blocking until there's some free space. It looks like you might be able to use DXGI_PRESENT_DO_NOT_WAIT though that may be specific to DX11 threaded model, rather than behaving like DX9's do not wait flag.


In Topic: Bubblegum Engine error

22 December 2011 - 06:56 AM

0xFEEEFEEE is the fill MSVC uses when something is freed. i.e. it's trying to delete something that has already been deleted.

A quick glance at the code shows the AGame pointer is deleted both outside the class (in main) and in the destructor for the MainEngine class - which is probably the issue...


In Topic: Problem with virtual function

14 October 2011 - 06:44 AM

You've sliced class2 by copying it into a class1 in the vector.

I presume this wasn't your intention as now you're holding a class1 not a class2 which will give you only the base classes methods.


In Topic: SSE optimizations not so optimized

14 September 2011 - 02:32 AM

Not entirely related but your timing code also times 'n' iterations of a 7-case switch statement: Invert the implementation to make one switch that contains one-loop-per-case to get cleaner results.