27 using namespace mondschein;
28 using namespace renderer;
30 GL13_Texture::GL13_Texture() : unit(0), texture(0)
32 glGenTextures(1,&texture);
36 GL13_Texture::GL13_Texture(
uint8 _u,
uint32 _t) : unit(_u), texture(_t)
41 GL13_Texture::~GL13_Texture()
43 glDeleteTextures(1,&texture);
47 void GL13_Texture::set_unit(
uint8 _u)
53 uint8 GL13_Texture::get_unit()
const
58 void GL13_Texture::set_texture(
uint32 _t)
64 uint32 GL13_Texture::get_texture()
const
69 void GL13_Texture::render()
const
71 if (glIsTexture(texture))
73 glActiveTexture(GL_TEXTURE0+unit);
74 glBindTexture(GL_TEXTURE_2D,texture);
78 std::string err(
"Mondschein Engine ERROR: Internal reference is not a valid OpenGL 1.3 compliant texture object. ");
79 err+=
"Exception raised in function\n\t";
80 err+=
"void mondschein::renderer::GL13_Texture::render() const";