Self

Byte Order and Byte Swapping

Include File(s): SDL_endian.h

Introduction

This category contains functions for handling endian-specific values.

Simple data types like integers and floats consist of several bytes. A 32bit integer (Sint32), for example, uses four bytes (as each byte has 8 bits). Endianness describes how the system orders the bytes of this value in memory.

Endianness comes in two forms - big and little.

Example: Imagine the 32bit integer number 16,909,060 in decimal.

For further information about endianness read the Wikipedia article on the subject.

SDL_BYTEORDER is a macro that corresponds to the byte order used by the processor type it was compiled for.

Functions


CategoryCategory

None: CategoryEndian (last edited 2017-02-19 20:43:49 by PhilippWiesemann)