All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GLPtexTexture Class Reference

#include <glPtexTexture.h>

Inheritance diagram for GLPtexTexture:
NonCopyable< GLPtexTexture >

Public Member Functions

GLuint GetPagesTextureBuffer () const
 
GLuint GetLayoutTextureBuffer () const
 
GLuint GetTexelsTexture () const
 Returns the texels texture array. More...
 
 ~GLPtexTexture ()
 

Static Public Member Functions

static GLPtexTextureCreate (PtexTexture *reader, unsigned long int targetMemory=0, int gutterWidth=0, int pageMargin=0)
 

Additional Inherited Members

Detailed Description

GLPTexture : implements simple support for ptex textures

The current implementation declares _texels as a GL_TEXTURE_2D_ARRAY of n pages of a resolution that matches that of the largest face in the PTex file.

Two GL_TEXTURE_BUFFER constructs are used as lookup tables :

  • _pages stores the array index in which a given face is located
  • _layout stores 4 float coordinates : top-left corner and width/height for each face

GLSL fragments use gl_PrimitiveID and gl_TessCoords to access the _pages and _layout indirection tables, which provide then texture coordinates for the texels stored in the _texels texture array.

Hbr provides per-face support for a ptex face indexing scheme. OsdGLDrawContext class provides ptex face index lookup table as a texture buffer object that can be accessed by GLSL shaders.

Definition at line 59 of file glPtexTexture.h.

Constructor & Destructor Documentation

Member Function Documentation

static GLPtexTexture* Create ( PtexTexture *  reader,
unsigned long int  targetMemory = 0,
int  gutterWidth = 0,
int  pageMargin = 0 
)
static
GLuint GetLayoutTextureBuffer ( ) const
inline

Returns the texture buffer containing the layout of the ptex faces in the texels texture array.

Definition at line 72 of file glPtexTexture.h.

GLuint GetPagesTextureBuffer ( ) const
inline

Returns the texture buffer containing the lookup table associate each ptex face index with its 3D texture page in the texels texture array.

Definition at line 68 of file glPtexTexture.h.

GLuint GetTexelsTexture ( ) const
inline

Returns the texels texture array.

Definition at line 75 of file glPtexTexture.h.


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