![]() |
Number5
Visualisierung 2 Project - Florian Schober (0828151, f.schober@live.com), Andreas Walch (0926780, walch.andreas89@gmail.com)
|
#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 |
A texture object, which was read from a file.
Definition at line 8 of file Texture.hpp.
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.
name | The filename of the texture |
Definition at line 4 of file Texture.cpp.
~Texture | ( | ) |
Destructs the texture.
Definition at line 49 of file Texture.cpp.
void bind | ( | uint | target = 0 | ) |
Activates the texture-target given by the target-parameter, and binds this texture to it.
target | The texture-target this texture should be bound to |
Definition at line 54 of file Texture.cpp.
|
inline |
An accessor for the OpenGL-id of the texture
Definition at line 19 of file Texture.hpp.
|
inline |
An accessor for the name/filename of the texture
Definition at line 29 of file Texture.hpp.
|
inline |
An accessor for the size of the texture
Definition at line 24 of file Texture.hpp.
|
private |
The OpenGL-id of the texture
Definition at line 12 of file Texture.hpp.
|
private |
The name/filename of the texture
Definition at line 10 of file Texture.hpp.
|
private |
The size of the texture
Definition at line 11 of file Texture.hpp.