71 while ( (res=wait(DISPLAY_EVT, 1000))==2)
73 printf(
"res: %d\n", res);
75 printf(
"res: %d\n", res);
83 CVCDisplay::CVCDisplay(
bool doubleBuffer,
bool show_overlay): m_width(DispGetColumns), m_height(DispGetRows), m_pitch(DispGetPitch), m_doubleBuffer(doubleBuffer)
109 std::fill_n( (
unsigned char*)OvlGetPhysPage, OvlGetRows*OvlGetPitch, 0);
142 display_update(UPDATE_DISP);
148 ScrSetDispPage(ScrGetCaptPage);
149 display_update(UPDATE_DISP);
156 setvar(OVLY_ACTIVE,1);
163 setvar(OVLY_ACTIVE,0);
173 const unsigned char* restrict img_pixels = image->
pixels;
184 std::copy(img_pixels, img_pixels+w, disp_pixels);
187 img_pixels += image->
width;
193 display_update(UPDATE_DISP);
200 const unsigned char* restrict img_pixels = image->
pixels;
201 unsigned char* restrict ovl_pixels = (
unsigned char*)OvlGetPhysPage;
204 int h = std::min(OvlGetRows, image->
height);
205 int w = std::min(OvlGetColumns, image->
width);
206 int ovl_pitch = OvlGetPitch;
210 std::copy(img_pixels, img_pixels+w, ovl_pixels);
212 img_pixels += image->
width;
213 ovl_pixels += ovl_pitch;
void disable_overlay() const
int width
The width of the image in pixels.
GLenum GLsizei GLenum GLenum const GLvoid * image
void show(const CByteImage *image)
Data structure for the representation of 8-bit grayscale images and 24-bit RGB (or HSV) color images ...
int m_allocated_backbuffer
unsigned char * pixels
The pointer to the the pixels.
void overlay(const CByteImage *ovl)
void make_current() const
CVCDisplay(bool doubleBuffer, bool show_overlay=false)
void enable_overlay() const
int height
The height of the image in pixels.
void sleep_ms(unsigned int ms)
void wait_for_next_frame()
GLenum GLenum GLvoid * row
unsigned char *restrict m_display_back
void restore_default() const
GLubyte GLubyte GLubyte GLubyte w
unsigned char *restrict m_display_front