Colobot
Public Member Functions | Public Attributes | List of all members
Gfx::Texture Struct Reference

Info about a texture. More...

#include <texture.h>

Public Member Functions

bool Valid () const
 Returns whether the texture is valid (ID != 0) More...
 
void SetInvalid ()
 Sets the ID to invalid value (0) More...
 
bool operator< (const Texture &other) const
 Comparator for use in texture maps and sets. More...
 
bool operator== (const Texture &other) const
 Comparator. More...
 

Public Attributes

unsigned int id = 0
 ID of the texture in graphics engine; 0 = invalid texture. More...
 
Math::IntPoint size
 Size of texture. More...
 
Math::IntPoint originalSize
 Original size of texture (as loaded from image) More...
 
bool alpha = false
 Whether the texture has alpha channel. More...
 

Detailed Description

Info about a texture.

Identifies (through id) a texture created in graphics engine. Also contains some additional data.

Member Function Documentation

bool Gfx::Texture::Valid ( ) const
inline

Returns whether the texture is valid (ID != 0)

void Gfx::Texture::SetInvalid ( )
inline

Sets the ID to invalid value (0)

bool Gfx::Texture::operator< ( const Texture other) const
inline

Comparator for use in texture maps and sets.

bool Gfx::Texture::operator== ( const Texture other) const
inline

Comparator.

Member Data Documentation

unsigned int Gfx::Texture::id = 0

ID of the texture in graphics engine; 0 = invalid texture.

Math::IntPoint Gfx::Texture::size

Size of texture.

Math::IntPoint Gfx::Texture::originalSize

Original size of texture (as loaded from image)

bool Gfx::Texture::alpha = false

Whether the texture has alpha channel.


The documentation for this struct was generated from the following file: