58 # include <TargetConditionals.h>
69 #elif defined(ANDROID) || defined(ANDROID_NDK)
70 # define SL_OS_ANDROID
74 # define SL_OS_WINDOWS
75 # define SL_USE_DISCARD_STEREOMODES
79 # define STDCALL __stdcall
80 #elif defined(linux) || defined(__linux) || defined(__linux__)
82 # define SL_USE_DISCARD_STEREOMODES
85 #elif defined(__EMSCRIPTEN__)
86 # define SL_EMSCRIPTEN
87 # define SL_USE_DISCARD_STEREOMODES
91 # error "SL has not been ported to this OS"
105 #if defined(SL_OS_MACIOS)
107 # include <functional>
109 # include <sys/time.h>
111 # include <CoreServices/CoreServices.h>
113 #elif defined(SL_OS_MACOS)
115 # include <functional>
120 # include <sys/sysctl.h>
121 #elif defined(SL_OS_ANDROID)
122 # include <sys/time.h>
123 # include <sys/system_properties.h>
125 # include <functional>
129 #elif defined(SL_OS_WINDOWS)
131 # include <functional>
134 # include <windows.h>
135 #elif defined(SL_OS_LINUX)
137 # include <functional>
140 # include <sys/time.h>
142 #elif defined(SL_EMSCRIPTEN)
145 # error "SL has not been ported to this OS"
156 #if defined(__GNUC__)
160 #if defined(_MSC_VER)
161 # define SL_COMP_MSVC
162 # define SL_STDCALL __stdcall
163 # define SL_DEPRECATED __declspec(deprecated)
164 # define _CRT_SECURE_NO_DEPRECATE
165 #elif defined(__BORLANDC__)
166 # define SL_COMP_BORLANDC
167 # define SL_STDCALL Stdcall
168 # define SL_DEPRECATED
169 #elif defined(__INTEL_COMPILER)
170 # define SL_COMP_INTEL
171 # define SL_STDCALL Stdcall
172 # define SL_DEPRECATED
173 #elif defined(__GNUC__)
174 # define SL_COMP_GNUC
176 # define SL_DEPRECATED __attribute__((deprecated))
178 # error "SL has not been ported to this compiler"
186 #ifndef SL_OS_ANDROID
249 return (
SLint)(vector.capacity() *
sizeof(
typename T::value_type));
257 #define SL_GETBIT(VAR, VAL) VAR& VAL
258 #define SL_SETBIT(VAR, VAL) VAR |= VAL
259 #define SL_DELBIT(VAR, VAL) VAR &= ~VAL
260 #define SL_TOGBIT(VAR, VAL) \
271 #define UNUSED_PARAMETER(r) ((void)(x))
279 #define SL_LOG(...) Utils::log("SLProject", __VA_ARGS__)
281 # define SL_LOG_DEBUG(...) Utils::log("SLProject", __VA_ARGS__)
283 # define SL_LOG_DEBUG(...) \
288 #define SL_EXIT_MSG(message) Utils::exitMsg("SLProject", (message), __LINE__, __FILE__)
289 #define SL_WARN_MSG(message) Utils::warnMsg("SLProject", (message), __LINE__, __FILE__)
float SLfloat
analog to GLfloat
unsigned int SLenum
analog to GLenum
vector< vector< SLuint > > SLVVuint
vector< SLubyte > SLVubyte
unsigned int SLbitfield
analog to GLbitfield
uint64_t SLuint64
64 bit unsigned integer
unsigned long SLulong
analog to GLulong
vector< vector< SLchar > > SLVVchar
vector< vector< SLshort > > SLVVshort
unsigned int SLuint
analog to GLuint
int8_t SLint8
8 bit signed integer
char SLchar
analog to GLchar (char is signed [-128 ... 127]!)
vector< size_t > SLVsize_t
unsigned char SLuchar
analog to GLuchar
double SLdouble
analog to GLdouble
vector< SLuchar > SLVuchar
vector< SLshort > SLVshort
int64_t SLint64
64 bit signed integer
vector< vector< SLushort > > SLVVushort
int32_t SLint32
32 bit signed integer
bool SLbool
analog to GLbool
unsigned short SLushort
analog to GLushort
unsigned char SLubyte
analog to GLubyte
vector< SLfloat > SLVfloat
vector< SLstring > SLVstring
uint16_t SLuint16
16 bit unsigned integer
vector< SLbool > SLVbool
All 1D vectors begin with SLV*.
signed long SLlong
analog to GLlong
vector< vector< SLint > > SLVVint
vector< vector< SLfloat > > SLVVfloat
All 2D vectors begin with SLVV*.
short SLshort
analog to GLshort
vector< SLulong > SLVulong
signed char SLbyte
analog to GLbyte
int16_t SLint16
16 bit signed integer
vector< SLushort > SLVushort
uint8_t SLuint8
8 bit unsigned integer
std::wstring SLwstring
analog to std::wstring, not available on Android
int SLsizei
analog to GLsizei
SLuint SL_sizeOfVector(const T &vector)
Returns the memory in bytes reserved by a vector.
vector< vector< SLuchar > > SLVVuchar
string SLstring
Redefinition of standard types for platform independence.
uint32_t SLuint32
32 bit unsigned integer