Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/gobj/texture.cxx File Reference

#include "pandabase.h"
#include "texture.h"
#include "config_gobj.h"
#include "texturePool.h"
#include "textureContext.h"
#include "datagram.h"
#include "datagramIterator.h"
#include "bamReader.h"
#include "bamWriter.h"
#include "string_utils.h"
#include <stddef.h>

Go to the source code of this file.

Functions

int up_to_power_2 (int value)
 Returns the smallest power of 2 greater than or equal to value.

int down_to_power_2 (int value)
 Returns the largest power of 2 less than or equal to value.

void consider_rescale (PNMImage &pnmimage, const string &name)
 Scales the PNMImage according to the whims of the Configrc file.

void consider_downgrade (PNMImage &pnmimage, int num_channels, const string &name)
 Reduces the number of channels in the texture, if necessary, according to num_channels.


Detailed Description

Definition in file texture.cxx.


Function Documentation

void consider_downgrade PNMImage pnmimage,
int  num_channels,
const string &  name
[static]
 

Reduces the number of channels in the texture, if necessary, according to num_channels.

Definition at line 131 of file texture.cxx.

References Colorf.

void consider_rescale PNMImage pnmimage,
const string &  name
[static]
 

Scales the PNMImage according to the whims of the Configrc file.

Definition at line 84 of file texture.cxx.

Referenced by Texture::read().

int down_to_power_2 int  value  )  [static]
 

Returns the largest power of 2 less than or equal to value.

Definition at line 66 of file texture.cxx.

References PNMImageHeader::get_x_size(), PNMImageHeader::get_y_size(), and up_to_power_2().

int up_to_power_2 int  value  )  [static]
 

Returns the smallest power of 2 greater than or equal to value.

Definition at line 48 of file texture.cxx.

References x.

Referenced by down_to_power_2().


Generated on Fri May 2 00:45:47 2003 for Panda by doxygen1.3