13 #ifndef _CS237_TEXTURE_HXX_
14 #define _CS237_TEXTURE_HXX_
17 #error "cs237-texture.hxx should not be included directly"
26 GLuint
Id()
const {
return this->_obj->_id; }
33 void Parameter (GLenum param, GLenum value);
34 void Parameter (GLenum param, GLint value);
46 Obj (GLuint
id) : _id(
id) { }
50 std::shared_ptr<Obj> _obj;
69 texture1D (GLenum target, GLenum ifmt, GLenum wid, GLenum fmt, GLenum ty);
92 texture2D (GLenum target, GLenum ifmt, GLenum wid, GLenum ht, GLenum fmt, GLenum ty);
GLuint Id() const
Definition: cs237-texture.hxx:26
GLenum Target() const
Definition: cs237-texture.hxx:27
Definition: cs237-color.hxx:83
Definition: cs237-image.hxx:78
Definition: cs237-texture.hxx:24
texture1D(image1d *img)
create a 1D texture initialized to the given 2D image data.
texture2D(GLenum target, image2d *img)
create a 2D texture initialized to the given 2D image data.
wrapper class for OpenGL 1D textures
Definition: cs237-texture.hxx:56
wrapper class for OpenGL 2D textures
Definition: cs237-texture.hxx:74
Definition: cs237-aabb.hxx:18
texture_base(GLenum target)
GLenum _target
Definition: cs237-texture.hxx:40
void Parameter(GLenum param, GLenum value)
set texture parameter values
Definition: cs237-image.hxx:115
void Bind()
bind this texture as the current texture