casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
casa::GLPCTexturedImage Class Reference

#include <GLPCTexture.h>

Inheritance diagram for casa::GLPCTexturedImage:
casa::GLPCDisplayListEntry casa::GLPCDisplayListElement

Public Member Functions

 GLPCTexturedImage (GLsizei width, GLsizei height, const GLushort *pixels, const GLPCTextureParams *=NULL)
 
 ~GLPCTexturedImage ()
 
void draw ()
 
void draw (GLfloat x, GLfloat y, GLfloat z=0.0, GLfloat xscale=1.0, GLfloat yscale=1.0)
 
void envmode (GLenum mode)
 
GLenum envmode () const
 
GLPCTextureParamsparams () const
 
- Public Member Functions inherited from casa::GLPCDisplayListEntry
 GLPCDisplayListEntry::GLPCDisplayListEntry (const char *name=NULL, GLenum mode=GL_COMPILE_AND_EXECUTE)
 
virtual ~GLPCDisplayListEntry ()
 
virtual void call (casacore::Bool force, const casacore::uInt spaces)
 Draw element unless disabled or force is true. More...
 
virtual void start ()
 Begin recording commands. More...
 
virtual void stop ()
 Stop display list recording. More...
 
- Public Member Functions inherited from casa::GLPCDisplayListElement
casacore::Bool enabled () const
 enable/disable More...
 
casacore::Bool disabled () const
 
virtual void disable ()
 
virtual void enable ()
 
const char * name () const
 Each element has a name which is printed out when tracing. More...
 
void name (const char *)
 
casacore::Bool trace () const
 Enable/disable tracing. More...
 
void trace (const casacore::Bool t)
 
casacore::uLong useCount () const
 Each element is reference counted. More...
 
void ref ()
 
void unref ()
 

Private Member Functions

void createTextures (GLsizei dWidth, GLsizei dHeight)
 
void storeImage (GLsizei dWidth, GLsizei dHeight, const GLushort *pixels)
 

Private Attributes

int ntx_
 
int nty_
 
int numTextures_
 
GLPCTextureObject ** textures_
 
GLfloat x_
 
GLfloat y_
 
GLfloat z_
 
GLfloat xscale_
 
GLfloat yscale_
 
GLsizei dWidth_
 
GLsizei dHeight_
 
GLPCTextureParamsparams_
 
GLint maxTextureSize_
 

Additional Inherited Members

- Public Types inherited from casa::GLPCDisplayListEntry
enum  RECORDSTATE {
  INITED,
  RECORDING,
  STOPPED
}
 
- Protected Member Functions inherited from casa::GLPCDisplayListElement
 GLPCDisplayListElement (const char *name=NULL)
 
virtual ~GLPCDisplayListElement ()
 Elements self delete when the reference count goes to 0. More...
 
void traceCheck (casacore::uInt spaces=0, const char *str=NULL, const char *name=NULL)
 

Detailed Description

Prerequisite

Synopsis

GLPCTexturedImage is used to convert an image to texture objects for display. The pixels array contains pixels stored as RGB triples. This class is typically only used by GLPixelCanvas If the image is larger than the maximum texture size, it will be broken into pieces that fit.

Definition at line 102 of file GLPCTexture.h.

Constructor & Destructor Documentation

casa::GLPCTexturedImage::GLPCTexturedImage ( GLsizei  width,
GLsizei  height,
const GLushort *  pixels,
const GLPCTextureParams = NULL 
)
casa::GLPCTexturedImage::~GLPCTexturedImage ( )

Member Function Documentation

void casa::GLPCTexturedImage::createTextures ( GLsizei  dWidth,
GLsizei  dHeight 
)
private
void casa::GLPCTexturedImage::draw ( )
void casa::GLPCTexturedImage::draw ( GLfloat  x,
GLfloat  y,
GLfloat  z = 0.0,
GLfloat  xscale = 1.0,
GLfloat  yscale = 1.0 
)

Thrown Exceptions

image and save values for later.

void casa::GLPCTexturedImage::envmode ( GLenum  mode)
GLenum casa::GLPCTexturedImage::envmode ( ) const
inline

Definition at line 114 of file GLPCTexture.h.

References casa::GLPCTextureParams::envmode_, and params_.

GLPCTextureParams* casa::GLPCTexturedImage::params ( ) const
inline

Definition at line 117 of file GLPCTexture.h.

References params_.

void casa::GLPCTexturedImage::storeImage ( GLsizei  dWidth,
GLsizei  dHeight,
const GLushort *  pixels 
)
private

Member Data Documentation

GLsizei casa::GLPCTexturedImage::dHeight_
private

Definition at line 129 of file GLPCTexture.h.

GLsizei casa::GLPCTexturedImage::dWidth_
private

Definition at line 129 of file GLPCTexture.h.

GLint casa::GLPCTexturedImage::maxTextureSize_
private

Definition at line 131 of file GLPCTexture.h.

int casa::GLPCTexturedImage::ntx_
private

Definition at line 124 of file GLPCTexture.h.

int casa::GLPCTexturedImage::nty_
private

Definition at line 124 of file GLPCTexture.h.

int casa::GLPCTexturedImage::numTextures_
private

Definition at line 125 of file GLPCTexture.h.

GLPCTextureParams* casa::GLPCTexturedImage::params_
private

Definition at line 130 of file GLPCTexture.h.

Referenced by envmode(), and params().

GLPCTextureObject** casa::GLPCTexturedImage::textures_
private

Definition at line 126 of file GLPCTexture.h.

GLfloat casa::GLPCTexturedImage::x_
private

Definition at line 127 of file GLPCTexture.h.

GLfloat casa::GLPCTexturedImage::xscale_
private

Definition at line 128 of file GLPCTexture.h.

GLfloat casa::GLPCTexturedImage::y_
private

Definition at line 127 of file GLPCTexture.h.

GLfloat casa::GLPCTexturedImage::yscale_
private

Definition at line 128 of file GLPCTexture.h.

GLfloat casa::GLPCTexturedImage::z_
private

Definition at line 127 of file GLPCTexture.h.


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