Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <windows.h>
- #define internal static
- #define local_persist static
- #define global_variable static
- // A struct that returns the buffer we draw to. Pixels are always 32-bits wide, 0xBBGGRRPP.
- struct win32_offscreen_buffer
- {
- BITMAPINFO Info;
- void *Memory;
- int width;
- int height;
- int pitch;
- int bytesPerPixel;
- };
- // A struct that returns the size of the window.
- struct win32_window_dimension
- {
- int width;
- int height;
- };
- // Stuff relating to sound buffer calculations.
- struct win32_sound_output
- {
- int samplesPerSecond;
- // Todo: Should runningSampleIndex be in bytes also?
- uint32_t runningSampleIndex;
- int bytesPerSample;
- DWORD secondaryBufferSize;
- float tSine;
- int latencySampleCount;
- DWORD safetyBytes;
- // Todo: Add a bytesPerSecond field to simplify math.
- };
- struct win32_debug_time_marker
- {
- DWORD OutputPlayCursor;
- DWORD OutputWriteCursor;
- DWORD OutputLocation;
- DWORD OutputByteCount;
- DWORD ExpectedFlipPlayCursor;
- DWORD FlipPlayCursor;
- DWORD FlipWriteCursor;
- };
Add Comment
Please, Sign In to add comment