28 #ifndef ZMOL_TEXTURE_HPP
29 #define ZMOL_TEXTURE_HPP
31 #include "opengl3.hpp"
32 #include "noncopyable.hpp"
53 enum { target = GL_TEXTURE_2D };
68 explicit texture(GLsizei
const p_width, GLsizei
const p_height, GLint
const p_internal_format, GLenum
const p_format, GLenum
const p_type);
78 inline GLsizei
get_width()
const {
return m_width; }
86 inline GLuint
get_name()
const {
return m_name; }
92 void bind(GLuint
const p_unit);
97 static void unbind(GLuint
const p_unit);
109 void upload_pixels(
void const *p_pixels,
unsigned int const p_num_pixel_bytes, GLenum
const p_pixel_data_format, GLenum
const p_pixel_data_type);
112 GLsizei m_width, m_height;
113 GLint m_internal_format;