src/video/gl/gl_texture.cpp File Reference

#include "supertux/gameconfig.hpp"
#include "video/gl/gl_texture.hpp"

Go to the source code of this file.

Functions

bool is_power_of_2 (int v)
int next_power_of_two (int val)


Function Documentation

bool @514::is_power_of_2 ( int  v  )  [inline, static]

Definition at line 22 of file gl_texture.cpp.

Referenced by GLTexture::GLTexture().

00023 {
00024   return (v & (v-1)) == 0;
00025 }

int @514::next_power_of_two ( int  val  )  [inline, static]

Definition at line 27 of file gl_texture.cpp.

Referenced by GLTexture::GLTexture().

00028 {
00029   int result = 1;
00030   while(result < val)
00031     result *= 2;
00032   return result;
00033 }


Generated on Mon Jun 9 03:38:27 2014 for SuperTux by  doxygen 1.5.1