#include <display2d_drawpixels.h>
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();
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. | |
| Display::ImageDrawPixels::ImageDrawPixels | ( | ) |
| Display::ImageDrawPixels::~ImageDrawPixels | ( | ) |
| void Display::ImageDrawPixels::update | ( | const DataType * | image, | |
| unsigned int | width, | |||
| unsigned int | height | |||
| ) | [inline] |
| 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
| unsigned int Display::ImageDrawPixels::m_size[2] |
1.5.5