Base functionality
More...
|
typedef void * | b2AllocFcn(unsigned int size, int alignment) |
| Prototype for user allocation function.
|
|
typedef void | b2FreeFcn(void *mem) |
| Prototype for user free function.
|
|
typedef int | b2AssertFcn(const char *condition, const char *fileName, int lineNumber) |
| Prototype for the user assert callback. Return 0 to skip the debugger break.
|
|
Base functionality
◆ b2Version
Version numbering scheme.
See https://semver.org/
Data Fields |
int |
major |
Significant changes. |
int |
minor |
Incremental changes. |
int |
revision |
Bug fixes. |
◆ b2AllocFcn
typedef void * b2AllocFcn(unsigned int size, int alignment) |
Prototype for user allocation function.
- Parameters
-
size | the allocation size in bytes |
alignment | the required alignment, guaranteed to be a power of 2 |
◆ b2FreeFcn
typedef void b2FreeFcn(void *mem) |
Prototype for user free function.
- Parameters
-
mem | the memory previously allocated through b2AllocFcn |
◆ b2GetByteCount()
int b2GetByteCount |
( |
void | | ) |
|
- Returns
- the total bytes allocated by Box2D
◆ b2SetAllocator()
This allows the user to override the allocation functions.
These should be set during application startup.
◆ b2SetAssertFcn()
Override the default assert callback.
- Parameters
-
assertFcn | a non-null assert callback |