mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-14 16:07:39 +00:00
Replaced nextHigher2, so CHAR_BIT define is not needed.
svn-id: r50904
This commit is contained in:
parent
69bf70d693
commit
d677ba5a11
@ -41,14 +41,14 @@ static inline GLint xdiv(int numerator, int denominator) {
|
||||
return (numerator << 16) / denominator;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static T nextHigher2(T k) {
|
||||
static GLuint nextHigher2(GLuint k) {
|
||||
if (k == 0)
|
||||
return 1;
|
||||
--k;
|
||||
for (uint i = 1; i < sizeof(T) * CHAR_BIT; i <<= 1)
|
||||
k = k | k >> i;
|
||||
return k + 1;
|
||||
GLuint nextPow = 1;
|
||||
while (nextPow <= k) {
|
||||
nextPow <<= 1;
|
||||
}
|
||||
return nextPow;
|
||||
}
|
||||
|
||||
void GLTexture::initGLExtensions() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user