Display::ImageDrawPixels Class Reference

#include <display2d_drawpixels.h>

List of all members.


Detailed Description

Draw an image with glDrawPixels() (write to frame buffer) Currently support any native image type (ie. unsigned char, unsigned short, and others) use update and display when image is changed:

        unsigned char* image = new unsigned char [100*100]; // fill data
        Display::ImageDrawPixels disp;

        disp.update(image, 100, 100);
        disp.display();

displayimage.png

Texture are not used, there is some performance issue when the texture needs to be update very fast (eg. playing a movie)

Public Member Functions

 ImageDrawPixels ()
 ~ImageDrawPixels ()
template<typename DataType>
void update (const DataType *image, unsigned int width, unsigned int height)
void display () const

Public Attributes

void * m_frame
 frame buffer
unsigned int m_size [2]
 frame size
GLenum m_format
 glDrawPixels param
GLenum m_type
 glDrawPixels param

Classes

struct  DrawPixelsArgs
 DrawPixels Arguments.


Constructor & Destructor Documentation

Display::ImageDrawPixels::ImageDrawPixels (  ) 

Display::ImageDrawPixels::~ImageDrawPixels (  ) 


Member Function Documentation

template<typename DataType>
void Display::ImageDrawPixels::update ( const DataType *  image,
unsigned int  width,
unsigned int  height 
) [inline]

Update the viewer with a new 2D image

References m_format, m_frame, m_size, and m_type.

void Display::ImageDrawPixels::display (  )  const

Draw the image with glDrawPixels if you need to position the image somewhere else use glRaster(x,y) instead of glTranslate, also glScale cannot be used


Member Data Documentation

frame buffer

Referenced by update().

frame size

Referenced by update().

glDrawPixels param

Referenced by update().

glDrawPixels param

Referenced by update().


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

Generated on Tue Aug 4 17:57:42 2009 for libvd by  doxygen 1.5.5