FPLBase
An open source project by FPL.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
texture.h File Reference
#include <vector>
#include "fplbase/config.h"
#include "fplbase/async_loader.h"
#include "fplbase/handles.h"
#include "mathfu/constants.h"
#include "mathfu/glsl_mappings.h"

Go to the source code of this file.

Classes

class  fplbase::Texture
 Abstraction for a texture object loaded on the GPU. More...
 

Namespaces

 fplbase
 Namespace for FPLBase library.
 

Typedefs

typedef std::function< Texture
*(const char *filename,
TextureFormat format,
TextureFlags flags)> 
fplbase::TextureLoaderFn
 used by some functions to allow the texture loading mechanism to be specified by the caller.
 

Enumerations

enum  fplbase::TextureFormat {
  fplbase::kFormatAuto = 0, kFormat8888, kFormat888, kFormat5551,
  kFormat565, kFormatLuminance, kFormatASTC, kFormatPKM,
  kFormatKTX, fplbase::kFormatNative, kFormatLuminanceAlpha, kFormatCount
}
 
enum  fplbase::TextureFlags {
  fplbase::kTextureFlagsNone = 0, fplbase::kTextureFlagsClampToEdge = 1 << 0, fplbase::kTextureFlagsUseMipMaps = 1 << 1, fplbase::kTextureFlagsIsCubeMap = 1 << 2,
  fplbase::kTextureFlagsLoadAsync = 1 << 3, fplbase::kTextureFlagsPremultiplyAlpha = 1 << 4
}
 Flags affecting loading and sampler modes for a texture. More...
 

Functions

TextureFlags fplbase::operator| (TextureFlags a, TextureFlags b)
 
bool fplbase::HasAlpha (TextureFormat format)
 determines if the format has an alpha component.
 
bool fplbase::IsCompressed (TextureFormat format)
 determines if the format is already compressed in some way. If image data is supplied in these formats, we use them as-is.