#include <glv_texture.h>
Public Member Functions | |
| Texture2 (GLsizei width, GLsizei height, GLenum format=GL_RGB, GLenum type=GL_UNSIGNED_BYTE) | |
| This constructor will allocate an internal pixel buffer. | |
| Texture2 (GLsizei width, GLsizei height, GLvoid *pixels=0, GLenum format=GL_RGB, GLenum type=GL_UNSIGNED_BYTE, bool doesLoad=false) | |
| Constructor. | |
| GLsizei | width () const |
| Get width. | |
| GLsizei | height () const |
| Get height. | |
| void | begin () const |
| Bind self to current context. | |
| void | end () const |
| Binds default texture. | |
| Texture2 & | bind () |
| Bind self to current context. | |
| Texture2 & | draw (float ql, float qt, float qr, float qb, float tl=0, float tt=1, float tr=1, float tb=0) |
| Texture2 & | load (GLsizei w, GLsizei h, GLvoid *pixels=0) |
| Resizes texture on graphics card. | |
| Texture2 & | reload () |
| Reload texture onto GPU. | |
| Texture2 & | send () |
| Send pointed to pixels to GPU. | |
| Texture2 & | format (GLenum v) |
| Set the color format. | |
| Texture2 & | type (GLenum v) |
| Set the color data type. | |
| Texture2 & glv::Texture2::draw | ( | float | ql, | |
| float | qt, | |||
| float | qr, | |||
| float | qb, | |||
| float | tl = 0, |
|||
| float | tt = 1, |
|||
| float | tr = 1, |
|||
| float | tb = 0 | |||
| ) |
| ql | Draw texture to rectangular quad |
1.5.5