CMSC23700 Common Code Library
Support code for CS23700 programming projects
cs237::texture2D Class Reference

wrapper class for OpenGL 2D textures More...

#include <cs237-texture.hxx>

Inherits cs237::__detail::texture_base.

Public Member Functions

 texture2D (GLenum target, image2d *img)
 create a 2D texture initialized to the given 2D image data. More...
 
 texture2D (GLenum target, GLenum ifmt, GLenum wid, GLenum ht, GLenum fmt, GLenum ty)
 create a 2D texture and allocate uninitialized storage for it. More...
 
- Public Member Functions inherited from cs237::__detail::texture_base
GLuint Id () const
 
GLenum Target () const
 
void Bind ()
 bind this texture as the current texture More...
 
void Parameter (GLenum param, GLenum value)
 set texture parameter values More...
 
void Parameter (GLenum param, GLint value)
 
void Parameter (GLenum param, color4f value)
 

Additional Inherited Members

- Protected Member Functions inherited from cs237::__detail::texture_base
 texture_base (GLenum target)
 
- Protected Attributes inherited from cs237::__detail::texture_base
GLenum _target
 

Detailed Description

wrapper class for OpenGL 2D textures

Constructor & Destructor Documentation

cs237::texture2D::texture2D ( GLenum  target,
image2d img 
)

create a 2D texture initialized to the given 2D image data.

Parameters
targetspecifies the target of the operation, which should be either GL_TEXTURE_2D, GL_PROXY_TEXTURE_2D, GL_TEXTURE_1D_ARRAY, GL_PROXY_TEXTURE_1D_ARRAY, GL_TEXTURE_RECTANGLE, GL_PROXY_TEXTURE_RECTANGLE, or GL_PROXY_TEXTURE_CUBE_MAP
imgspecifies the initial texture image data
cs237::texture2D::texture2D ( GLenum  target,
GLenum  ifmt,
GLenum  wid,
GLenum  ht,
GLenum  fmt,
GLenum  ty 
)

create a 2D texture and allocate uninitialized storage for it.

Parameters
targetspecifies the target of the operation
ifmtspecifies the internal texture format
widspecifies the texture width
htspecifies the texture height
fmtspecifies the image format
tyspecifies the type of the image elements

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