| pgl
    PrimitiveOpenGL3Dprimitivelibrary | 
#include <pgl.h>

| Public Member Functions | |
| Texture (int width, int height, unsigned char *data, bool interpolate=false) | |
| Loads texture data from existing RGB array. Data can be discarded afterwards. | |
| Texture (const std::string &file, bool interpolate=true) | |
| Loads texture from Portable Pixmap (PPM) file. | |
| operator bool () const | |
| Returns whether texture is valid. | |
| void | bind () const | 
| Use this texture as the current OpenGL 2D texture. | |
| Public Attributes | |
| int | width = 0 | 
| Texture width. Do not modify. | |
| int | height = 0 | 
| Texture height. Do not modify. | |
| Protected Types | |
| typedef std::shared_ptr< GLuint > | GLuintPtr | 
| Protected Member Functions | |
| void | make (int _width, int _height, unsigned char *data, bool interpolate) | 
| void | eatcomments (std::ifstream &ifs) | 
| int | readint (std::ifstream &ifs) | 
| Read integer value from PPM file, ignoring comments and whitespace. | |
| Protected Attributes | |
| GLuintPtr | texture_ = 0 | 
| OpenGL texture identifier. | |
Loads data into an OpenGL texture. This is a lightweight class that can be copied at will.
 1.8.13
 1.8.13