+1 for the #include <x86intrin.h> and support for BEGIN_TIMED_BLOCK on other compilers. It would be nice if GCC was supported too.
Is it necessary to discriminate between compilers regarding to intrinsics on the x86 platform? It seems that MSVC, LLVM and GCC all support the format defined by Intel including the __rdtsc operation.
@Miblo: Regarding flipping the Y-axis; I am using the SDL port and had the same problem. After getting annoyed by the slowdown of flipping the Y-axis in the platform layer, I realized that you can ask the game to do it for you. Just advance the memory pointer and negate the pitch:
| game_offscreen_buffer Buffer = {};
Buffer.Memory = ((uint8*)GlobalBackbuffer.Memory) + (GlobalBackbuffer.Width * (GlobalBackbuffer.Height-1) * GlobalBackbuffer.BytesPerPixel);
Buffer.Pitch = -GlobalBackbuffer.Pitch;
|
It works for now, but not sure if Casey will keep this “feature” in the game layer.