MCPcopy Create free account
hub / github.com/DentonW/DevIL / ILAPIENTRY iFlipBuffer

Function ILAPIENTRY iFlipBuffer

DevIL/src-IL/src/il_manip.cpp:223–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221}
222
223void ILAPIENTRY iFlipBuffer(ILubyte *buff, ILuint depth, ILuint line_size, ILuint line_num)
224{
225 ILubyte *StartPtr, *EndPtr;
226 ILuint y, d;
227 const ILuint size = line_num * line_size;
228
229 for (d = 0; d < depth; d++) {
230 StartPtr = buff + d * size;
231 EndPtr = buff + d * size + size;
232
233 for (y = 0; y < (line_num/2); y++) {
234 EndPtr -= line_size;
235 iMemSwap(StartPtr, EndPtr, line_size);
236 StartPtr += line_size;
237 }
238 }
239}
240
241// Just created for internal use.
242ILubyte* iFlipNewBuffer(ILubyte *buff, ILuint depth, ILuint line_size, ILuint line_num)

Callers

nothing calls this directly

Calls 1

iMemSwapFunction · 0.85

Tested by

no test coverage detected