I was watching day 27 and doing the drawRectangle function and at some point I though it would be great to add an assert to check if minX < maxX (before realising the for loop will check for that) and made a call to drawRectangle that would trigger the assert.
I recompiled with the game still running and Visual studio display the "break window" but didn't load the PDB file and I could not debug. I have to click the "Browse and find handmade_xxxx.pdb..." link for it to load (I don't have to browse, it load as soon as I click the link).
[attachment=9]pdb_problem.jpg[/attachment]
I though it might be that the assert triggers directly and the pdb file isn't ready right after the dll creation, but I set the drawRectangle call on a button press and the same thing happened. If I restart the application (no dll hotloading) the pdb is correctly loaded right away. Does that happen only for me ? Am I missing some setting ? I use Visual Studio 2012 pro.
Another unrelated small question : my drawRectangle code looks like this
1 2 3 4 5 6 7 | uint32* pixel = ( uint32* ) buffer->memory; for ( int y = roundedMinY; y < roundedMaxY; y++ ) { for ( int x = roundedMinX; x < roundedMaxX; x++ ) { *( pixel + y * buffer->width + x ) = color; } } |
Is there a downside to computing the pixel offset from x and y every loop cycle instead of incrementing a pixel pointer ?
Thanks !