#include <stdlib.h>
#include <SDL3/SDL_assert.h>
#include <SDL3/SDL_gpu.h>
#include <SDL3/SDL_log.h>
#include <Objectively/Types.h>
Go to the source code of this file.
|
| #define | OBJECTIVELYGPU_EXPORT extern |
| |
| #define | OBJECTIVELYGPU_EXPORT_DATA |
| |
| #define | MakePoint(x, y) (SDL_Point) { (x), (y) } |
| | Creates an SDL_Point with the given coordinates.
|
| |
| #define | MakeRect(x, y, w, h) (SDL_Rect) { (x), (y), (w), (h) } |
| | Creates an SDL_Rect with the given origin and size.
|
| |
| #define | MakeSize(w, h) (SDL_Size) { (w), (h) } |
| | Creates an SDL_Size with the given dimensions.
|
| |
| #define | GPU_Assert(cond, fmt, ...) |
| | Asserts that cond is true, logging the SDL error and exiting on failure.
|
| |
◆ GPU_Assert
| #define GPU_Assert |
( |
|
cond, |
|
|
|
fmt, |
|
|
|
... |
|
) |
| |
Value: do { \
if (!(cond)) { \
SDL_LogCritical(SDL_LOG_CATEGORY_GPU, "%s::%d::%s: " fmt ": %s", __FILE__, __LINE__, __func__, ## __VA_ARGS__, SDL_GetError()); \
SDL_TriggerBreakpoint(); \
exit(EXIT_FAILURE); \
} \
} while (0)
Asserts that cond is true, logging the SDL error and exiting on failure.
Unlike assert(3), this macro is never compiled out.
◆ MakePoint
| #define MakePoint |
( |
|
x, |
|
|
|
y |
|
) |
| (SDL_Point) { (x), (y) } |
Creates an SDL_Point with the given coordinates.
◆ MakeRect
| #define MakeRect |
( |
|
x, |
|
|
|
y, |
|
|
|
w, |
|
|
|
h |
|
) |
| (SDL_Rect) { (x), (y), (w), (h) } |
Creates an SDL_Rect with the given origin and size.
◆ MakeSize
| #define MakeSize |
( |
|
w, |
|
|
|
h |
|
) |
| (SDL_Size) { (w), (h) } |
Creates an SDL_Size with the given dimensions.
◆ OBJECTIVELYGPU_EXPORT
| #define OBJECTIVELYGPU_EXPORT extern |
◆ OBJECTIVELYGPU_EXPORT_DATA
| #define OBJECTIVELYGPU_EXPORT_DATA |
◆ SDL_Size