SuzanneIsland: An island of Real-time rendering effects!
Public Types | Public Member Functions
Texture Class Reference

Texture class. More...

#include <texture.hpp>

Public Types

enum  FilterType {
  NEAREST_MIPMAP_OFF = 0, NEAREST_MIPMAP_NEAREST = 1, NEAREST_MIPMAP_LINEAR = 2, LINEAR_MIPMAP_OFF = 3,
  LINEAR_MIPMAP_NEAREST = 4, LINEAR_MIPMAP_LINEAR = 5
}
 

Public Member Functions

 Texture (const std::string &filePath)
 
void bind (int unit)
 binds this texture to the given opengl texture unit More...
 
void setFilterMode (FilterType filterType)
 set texture minification and magnification filters minification: how to filter texture in case of undersampling (area too small, less pixels/samples than texels) magnification: how to filter texture in case of oversampling (area too big, more pixels/samples than texels) More...
 
std::string getFilePath () const
 get the texture file path More...
 

Detailed Description

Texture class.

Creates an opengl texture from an image file and stores a handle to it.

Member Function Documentation

§ bind()

void Texture::bind ( int  unit)
inline

binds this texture to the given opengl texture unit

Parameters
[in]unitthe opengl texture unit to bind to

§ getFilePath()

std::string Texture::getFilePath ( ) const
inline

get the texture file path

Returns
the texture file path

§ setFilterMode()

void Texture::setFilterMode ( FilterType  filterType)
inline

set texture minification and magnification filters minification: how to filter texture in case of undersampling (area too small, less pixels/samples than texels) magnification: how to filter texture in case of oversampling (area too big, more pixels/samples than texels)

Parameters
filterType

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