Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>setgraphbufsize() specify size of internal graphics buffer</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 setgraphbufsize()       Specify Size of Internal Graphics Buffer

 #include   <graphics.h>

 unsigned far setgraphbufsize(bsize);
 unsigned     bsize;

    setgraphbufsize() tells initgraph() how much memory to allocate for
    the internal graphics buffer used by some graphics functions.  It
    must be called before initgraph().  If setgraphbufsize() is not
    called, the buffer is set to 4096 bytes.  With setgraphbufsize() the
    buffer can be made larger or smaller.  The memory buffer is released
    when closegraph() is called.

    Returns:    The previous size of the internal graphics buffer.

   -------------------------------- Example ---------------------------------

    The following statements override the default buffer size of 4096
    bytes by setting it to 1024 bytes with setgraphbufsize().

           #include <graphics.h>


           main()
           {
               int gdriver = DETECT;
               int gmode;
               int bsize;

               setgraphbufsize(1024);
               initgraph(&gdriver,&gmode,"");
                 .
               /* graphics functions */
                 .
               closegraph();
           }


See Also: closegraph() initgraph()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson