Display::Image Class Reference

#include <display2d.h>

List of all members.


Detailed Description

2D image viewer

Draw an image with 2D textures 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 the data
        Display::Image disp;

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

displayimage.png

If an image needs to be updated very fast (eg. playing a movie) transfers to the texture memory can become a bottleneck In this case, Display::ImageDrawPixels<T> might be more suitable as it directly writes the image in the frame buffer.

Todo:
Should be able to display any image size

Public Member Functions

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

Classes

struct  OpenGLArgs
 OpenGL constants.

Constructor & Destructor Documentation

Display::Image::Image (  ) 

Display::Image::~Image (  ) 


Member Function Documentation

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

Update the viewer with a new 2D image

void Display::Image::display (  )  const

Draw the image on a centered unit square use glTranslate/glScale to move the image around


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