Lightweight Graphics

GDispBegin

Start collecting pixel drawing

Syntax

Signature
void GDispBegin( void );

Arguments

None.

Return value

No return value.

Description

The window does not show each drawing call at once; GDispEnd() shows everything drawn since GDispBegin(). This is much faster for many small calls such as GPutPixel(). Calls can be nested; every GDispBegin() needs its GDispEnd().

Example

gdispbegin.c
#include "xdev-wtui.h"

int main( void )
{
   int green = GMakeColor( 0, 200, 0 );

   GDispBegin();
   for( int y = 0; y < 200; ++y )
      for( int x = 0; x < 200; x += 3 )
         GPutPixel( y, x, green );
   GDispEnd();

   Inkey( 0, NIL );

   return 0;
}

See also