Public Member Functions

glv::Texture2 Class Reference

2-D texture More...

#include <glv_texture.h>

List of all members.

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.
template<class T >
T * buffer () const
 Get pointer to local texture memory.
GLsizei width () const
 Get width.
GLsizei height () const
 Get height.
void begin () const
 Bind self to current context.
void end () const
 Binds default texture.
int alloc (int w, int h)
 Allocate local texture memory.
void dealloc ()
 Free local texture memory.
Texture2bind ()
 Bind self to current context.
Texture2draw (float ql, float qt, float qr, float qb, float tl=0, float tt=1, float tr=1, float tb=0)
Texture2create (GLsizei w, GLsizei h, GLvoid *pixels=0)
 Create new texture on graphics card.
Texture2create ()
 Reload texture onto GPU.
Texture2send ()
 Send pointed to pixels to GPU.
Texture2format (GLenum v)
 Set the color format.
Texture2type (GLenum v)
 Set the color data type.

Detailed Description

2-D texture


Member Function Documentation

int glv::Texture2::alloc ( int  w,
int  h 
)

Allocate local texture memory.

Returns total number of bytes allocated.

Texture2 & glv::Texture2::draw ( float  ql,
float  qt,
float  qr,
float  qb,
float  tl = 0,
float  tt = 1,
float  tr = 1,
float  tb = 0 
)
Parameters:
ql Draw texture to rectangular quad

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