MCPcopy Create free account
hub / github.com/DentonW/DevIL / ilNextPower2

Function ilNextPower2

DevIL/src-IL/src/il_utility.cpp:139–146  ·  view source on GitHub ↗

Returns the next power of 2 if Num isn't 2^n or returns Num if Num is 2^n

Source from the content-addressed store, hash-verified

137
138// Returns the next power of 2 if Num isn't 2^n or returns Num if Num is 2^n
139ILAPI ILuint ILAPIENTRY ilNextPower2(ILuint n)
140{
141 ILuint power = 1;
142 while( power < n ) {
143 power <<= 1;
144 }
145 return power;
146}
147
148ILAPI void ILAPIENTRY iMemSwap(ILubyte *s1, ILubyte *s2, const ILuint size)
149{

Callers 10

iCheckVtfFunction · 0.85
CheckDimensionsFunction · 0.85
iLoadTplInternalFunction · 0.85
iCheckIwiFunction · 0.85
MakeD3D8CompliantFunction · 0.85
MakeD3D10CompliantFunction · 0.85
MakeD3D9CompliantFunction · 0.85
MakeD3DmCompliantFunction · 0.85
MakeGLCompliant2DFunction · 0.85
MakeGLCompliant3DFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected