srp
software rendering pipeline
Loading...
Searching...
No Matches
defines.h
Go to the documentation of this file.
1
// Software Rendering Pipeline (SRP) library
2
// Licensed under GNU GPLv3
3
7
#pragma once
8
11
#if defined(SRP_MALLOC) && defined(SRP_FREE) && defined(SRP_REALLOC)
12
// ok
13
#elif !defined(SRP_MALLOC) && !defined(SRP_FREE) && !defined(SRP_REALLOC)
14
#include "
alloc.h
"
15
#define SRP_MALLOC(s) srpMalloc(s)
16
#define SRP_REALLOC(p, s) srpRealloc(p, s)
17
#define SRP_FREE(p) srpFree(p)
18
#else
19
#error "Must define all or none of SRP_MALLOC, SRP_FREE, and SRP_REALLOC"
20
#endif
// ingroup Memory_allocation
22
25
#ifndef SRP_FORCEINLINE
26
#if defined(__clang__)
// clang
27
#define SRP_FORCEINLINE inline
28
#elif defined(__GNUC__)
// gcc
29
#define SRP_FORCEINLINE __attribute__((always_inline)) inline
30
#elif defined(_MSC_VER)
// msvc
31
#define SRP_FORCEINLINE __forceinline
32
#else
33
#define SRP_FORCEINLINE inline
34
#warning \
35
"Unrecognized compiler - setting `SRP_FORCEINLINE` to just `inline` \
36
(it is not forced anymore!)"
37
#endif
38
#endif
// ingroup Various_internal
40
alloc.h
src
defines.h
Generated by
1.9.8