Number5
Visualisierung 2 Project - Florian Schober (0828151, f.schober@live.com), Andreas Walch (0926780, walch.andreas89@gmail.com)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
Texture Class Reference

#include <Texture.hpp>

Public Member Functions

GLuint & getId ()
 
uvec2 & getSize ()
 
string & getName ()
 
 Texture (string const &name)
 
 ~Texture ()
 
void bind (uint target=0)
 

Private Attributes

string m_name
 
uvec2 m_size
 
GLuint m_id
 

Detailed Description

A texture object, which was read from a file.

Definition at line 8 of file Texture.hpp.

Constructor & Destructor Documentation

Texture ( string const &  name)

Constructs a texture out of a file. The file will be read an its contents will be stored in the texutre.

Parameters
nameThe filename of the texture

Definition at line 4 of file Texture.cpp.

~Texture ( )

Destructs the texture.

Definition at line 49 of file Texture.cpp.

Member Function Documentation

void bind ( uint  target = 0)

Activates the texture-target given by the target-parameter, and binds this texture to it.

Parameters
targetThe texture-target this texture should be bound to

Definition at line 54 of file Texture.cpp.

GLuint& getId ( )
inline

An accessor for the OpenGL-id of the texture

Returns
A reference to the OpenGL-id of the texture

Definition at line 19 of file Texture.hpp.

string& getName ( )
inline

An accessor for the name/filename of the texture

Returns
A reference to the name/filename of the texture

Definition at line 29 of file Texture.hpp.

uvec2& getSize ( )
inline

An accessor for the size of the texture

Returns
A reference to the size of the texture

Definition at line 24 of file Texture.hpp.

Member Data Documentation

GLuint m_id
private

The OpenGL-id of the texture

Definition at line 12 of file Texture.hpp.

string m_name
private

The name/filename of the texture

Definition at line 10 of file Texture.hpp.

uvec2 m_size
private

The size of the texture

Definition at line 11 of file Texture.hpp.


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