Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

Texture Class Reference

#include <texture.h>

Inheritance diagram for Texture:

Inheritance graph
List of all members.

Public Types

enum  AddressMode { Wrap = 0, BorderClamp = 1, EdgeClamp = 2 }
enum  MipMapMode { DefaultMipMaps = 0, NoMipMaps = 1, AutoMipMaps = 2 }

Public Member Functions

virtual void beginUsage ()
virtual void bind ()=0
virtual void endUsage ()
int getDepth () const
int getHeight () const
virtual int getLODCount () const
virtual const TextureTile getTile (int lod, int u, int v)=0
virtual int getUTileCount (int lod) const
virtual int getVTileCount (int lod) const
int getWidth () const
virtual int getWTileCount (int lod) const
bool hasAlpha () const
virtual void setBorderColor (Color)
 Texture (int w, int h, int d=1)
virtual ~Texture ()

Protected Attributes

bool alpha

Private Attributes

int depth
int height
int width

Member Enumeration Documentation

enum Texture::AddressMode
 

Enumeration values:
Wrap 
BorderClamp 
EdgeClamp 

Definition at line 75 of file texture.h.

00076     {
00077         Wrap        = 0,
00078         BorderClamp = 1,
00079         EdgeClamp   = 2,
00080     };

enum Texture::MipMapMode
 

Enumeration values:
DefaultMipMaps 
NoMipMaps 
AutoMipMaps 

Definition at line 82 of file texture.h.

00083     {
00084         DefaultMipMaps = 0,
00085         NoMipMaps      = 1,
00086         AutoMipMaps    = 2,
00087     };


Constructor & Destructor Documentation

Texture::Texture int  w,
int  h,
int  d = 1
 

Definition at line 342 of file texture.cpp.

00342                                     :
00343     width(w), height(h), depth(d), alpha(false)
00344 {
00345 }

Texture::~Texture  )  [virtual]
 

Definition at line 348 of file texture.cpp.

00349 {
00350 }


Member Function Documentation

virtual void Texture::beginUsage  )  [inline, virtual]
 

Reimplemented in VirtualTexture.

Definition at line 64 of file texture.h.

00064 {};

virtual void Texture::bind  )  [pure virtual]
 

Implemented in ImageTexture, TiledTexture, CubeMap, and VirtualTexture.

Referenced by GLSL_RenderContext::makeCurrent(), FixedFunctionRenderContext::makeCurrent(), Renderer::render(), Mesh3DS::render(), Renderer::renderBodyAsParticle(), renderClouds_GLSL(), renderEclipseShadows(), renderEclipseShadows_Shaders(), Galaxy::renderGalaxyPointSprites(), Renderer::renderObject(), CelestiaCore::renderOverlay(), renderRings(), renderRings_GLSL(), renderSphere_GLSL(), and Renderer::renderStars().

virtual void Texture::endUsage  )  [inline, virtual]
 

Reimplemented in VirtualTexture.

Definition at line 65 of file texture.h.

00065 {};

int Texture::getDepth  )  const
 

Definition at line 394 of file texture.cpp.

References depth.

00395 {
00396     return depth;
00397 }

int Texture::getHeight  )  const
 

Definition at line 388 of file texture.cpp.

References height.

Referenced by CubeMap::CubeMap(), ImageTexture::ImageTexture(), and CelestiaCore::renderOverlay().

00389 {
00390     return height;
00391 }

int Texture::getLODCount  )  const [virtual]
 

Reimplemented in VirtualTexture.

Definition at line 353 of file texture.cpp.

00354 {
00355     return 1;
00356 }

virtual const TextureTile Texture::getTile int  lod,
int  u,
int  v
[pure virtual]
 

Implemented in ImageTexture, TiledTexture, CubeMap, and VirtualTexture.

Referenced by LODSphereMesh::renderSection().

int Texture::getUTileCount int  lod  )  const [virtual]
 

Reimplemented in TiledTexture, and VirtualTexture.

Definition at line 359 of file texture.cpp.

Referenced by LODSphereMesh::renderSection().

00360 {
00361     return 1;
00362 }

int Texture::getVTileCount int  lod  )  const [virtual]
 

Reimplemented in TiledTexture, and VirtualTexture.

Definition at line 365 of file texture.cpp.

Referenced by LODSphereMesh::renderSection().

00366 {
00367     return 1;
00368 }

int Texture::getWidth  )  const
 

Definition at line 382 of file texture.cpp.

References width.

Referenced by CubeMap::CubeMap(), ImageTexture::ImageTexture(), and CelestiaCore::renderOverlay().

00383 {
00384     return width;
00385 }

int Texture::getWTileCount int  lod  )  const [virtual]
 

Definition at line 371 of file texture.cpp.

00372 {
00373     return 1;
00374 }

bool Texture::hasAlpha  )  const [inline]
 

Definition at line 73 of file texture.h.

References alpha.

Referenced by GLSL_RenderContext::makeCurrent(), and FixedFunctionRenderContext::makeCurrent().

00073 { return alpha; }

void Texture::setBorderColor Color   )  [virtual]
 

Reimplemented in ImageTexture, TiledTexture, and CubeMap.

Definition at line 377 of file texture.cpp.

Referenced by Renderer::init().

00378 {
00379 }


Member Data Documentation

bool Texture::alpha [protected]
 

Definition at line 90 of file texture.h.

Referenced by hasAlpha().

int Texture::depth [private]
 

Definition at line 95 of file texture.h.

Referenced by getDepth().

int Texture::height [private]
 

Definition at line 94 of file texture.h.

Referenced by getHeight().

int Texture::width [private]
 

Definition at line 93 of file texture.h.

Referenced by getWidth().


The documentation for this class was generated from the following files:
Generated on Sat Jan 14 22:33:39 2006 for Celestia by  doxygen 1.4.1