30 lines
583 B
C
30 lines
583 B
C
#ifndef SDL_HANDMADE_H
|
|
#define SDL_HANDMADE_H
|
|
|
|
#include <SDL.h>
|
|
|
|
typedef struct sdl_window_dimension {
|
|
S32 Width;
|
|
S32 Height;
|
|
} sdl_window_dimension;
|
|
|
|
typedef struct offscreen_buffer {
|
|
// Pixels are always 32-bit and have the bytes in BGRX (little-endian).
|
|
SDL_Texture *Texture;
|
|
void *Memory;
|
|
S32 Width;
|
|
S32 Height;
|
|
S32 Pitch;
|
|
} offscreen_buffer;
|
|
|
|
typedef struct sdl_sound_output {
|
|
S32 SamplesPerSecond;
|
|
S32 BytesPerSample;
|
|
S32 SecondaryBufferSize;
|
|
F32 tSine;
|
|
S32 LatencySampleCount;
|
|
void *Samples;
|
|
} sdl_sound_output;
|
|
|
|
#endif
|