#include <cs237-image.hxx>
Inherits cs237::__detail::image_base.
|
| image1d (uint32_t wid, GLenum fmt, GLenum ty) |
|
| image1d (std::string const &file) |
|
GLsizei | width () const |
| return the width of the image More...
|
|
void | texImage (GLuint texId) |
|
bool | write (const char *file) |
|
unsigned int | nDims () const |
| the number of dimensions (1, 2, or 3) More...
|
|
unsigned int | format () const |
|
unsigned int | type () const |
|
void * | data () const |
| the data pointer More...
|
|
size_t | nBytes () const |
| the total number of bytes of image data More...
|
|
unsigned int | nChannels () const |
| the number of channels (1, 2, 3, or 4) More...
|
|
cs237::image1d::image1d |
( |
uint32_t |
wid, |
|
|
GLenum |
fmt, |
|
|
GLenum |
ty |
|
) |
| |
create and allocate space for an uninitialized image
- Parameters
-
wid | the width of the image |
fmt | the image format, which should be one of GL_RED, GL_RG, GL_RGB, GL_BGR GL_RGBA, or GL_BGRA. |
ty | the type of the elements, which should be one of GL_UNSIGNED_BYTE GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, or GL_UNSIGNED_INT_2_10_10_10_REV |
cs237::image1d::image1d |
( |
std::string const & |
file | ) |
|
create and initialize an image from a PNG file.
- Parameters
-
file | the name of the PNG file |
void cs237::image1d::texImage |
( |
GLuint |
texId | ) |
|
Load the image into a 1D GL texture; this function also binds the current texture to texId
- Parameters
-
[in] | texId | the GL texture ID for this image |
GLsizei cs237::image1d::width |
( |
| ) |
const |
|
inline |
return the width of the image
bool cs237::image1d::write |
( |
const char * |
file | ) |
|
write the texture to a file in PNG format
- Parameters
-
file | the name of the PNG file |
- Returns
- true if successful, false otherwise
The documentation for this class was generated from the following file: