About OpenGUI


OpenGUI
is a high-Level C/C++ graphics & windowing library built upon a fast, low-level x86 asm graphics kernel. OpenGUI provides 2D drawing primitives and an event-driven windowing API for easy application development, and it supports the BMP image file format. It's very powerful, but very easy to use. You can write apps in the old Borland BGI style or in a windowed style like QT. OpenGUI supports the keyboard and mouse as event sources, and the Linux framebuffer/svgalib/X11/DGA as drawing backends. Mesa3D is also supported under Linux & Windows. On now 8, 15, 16 and 32-bit color modes are available.It is under LGPL license.

OpenGUI is a very fast multi-platform 32-bit graphics library/GUI for MS-DOS (DPMI client/DJGPP), QNX4 (Watcom or GCC), Windows and LINUX. It can be used to create graphic applications and games for these Operating Systems. The library can be used with GNU C++ (from ver. 2.7.2) or Watcom C++ (from 9.5) and NASM assembler (0.98). The library is very stable and is ready for programs that require realtime drawing and Windowed GUI.


INHERITANCE DIAGRAM for DrawBuffer class

tree.gif (7391 bytes)

Controls tree

 

tree2.gif (2335 bytes)

Basic driver/architecture configuration
(update: later was added Linux/X11 and SOLARIS 8 drivers)


Introduction - [slovak version]

Features:

  • LGPL
  • ultra-fast (asm kernel & MMX support)
  • the most robust library for the Linux FrameBuffer
  • support for resolutions ranging from 320x200 to 1600x1200
  • and 8, 15, 16 and 32 color depths
  • windowing system
  • object-oriented multi-platform API (DJGPP, WATCOM, GCC, LINUX, QNX, BORLAND C++)
  • full application development framework (configuration file, file & color dialogs, etc.)
  • professionally tested & actively used for some years (see examples)
  • a tool for interactive code generation (paint & run)
  • and much more

The library consists of three layers. The first layer is a hand-coded and fast assembler kernel. This layer does the biggest piece of hard work. The second layer implements the API for drawing graphics primitives like lines, rectangles, circles etc. This layer is comparable to Borland BGI API. The third layer is written with C++ and offers a complete object set for the GUI developer. The third layer implements objects like input windows, buttons, menus, bitmaps etc, with addition of integrated mouse & keyboards support.


Links to similar project:

  • Portable Threads - Pth
  • QpThread library - C++ advanced thread manipulating (Unix, Win32) (NEW)
  • svgalib - linux console graphics standard
  • MiniGUI - pretty good windowing in MS WIN32 style ...
  • MicroWindows - another good windowing lib
  • skyvideo - linux, win32 graphics library
  • SDL - Simple DirectMedia Layer - linux, BeOS, DirectX ... very COOL
  • g2 - X11 and WIN32 graphics library
  • uniforms - the complete  GUI for DJGPP (uses allegro & DLX system)
  • GGI - general graphics interface for linux
  • xfb - linux framebuffer accelerator
  • official RHIDE homepage (NEW - fixed)
  • NASM - Netwide ASseMbler

Little example of code

/*
* This example shows PAGE FLIPPING feature of OpenGUI library
*
*    requirement: 1MB videocards (2MB for 16bit colors or 4MB for true colors)
*    FPS (frames per secs) is based on monitor frequency & CPU speed heavily
*/

#include <fastgl/fastgl.h>

extern "C" int verbose; // be verbose, an internal var.

void animate(void)
{
    static int i=0,j=200,l=2000;
    set_ppop(_GSET);
    clear_frame_buffer(CWHITE);
    set_fcolor(CBLACK);
    fill_ellipse(X_width/2, Y_width/2,i,j);
    fill_ellipse(X_width/2, Y_width/2,j,i);
    i++;
    if (i==200) i=0;
    j--;
    if (j==0) j=200;
    Flip();
    if (l-- == 0) App::AppDone(); // return after 2000 frames
}

int main(int argc, char **argv)
{
    verbose = 1;
    App app(G640x480,argc,argv,0,APP_ALL);

    // you can use FG_DOUBLEBUFFER or FG_QUADBUFFER too
    // NOTE: DOUBLEBUFFER are flicker on some cards & drivers
    EnableBuffering(FG_TRIPLEBUFFER);

    // set main loop code
    app.SetDelayProc(animate);

    // GO!     - 'ALT+X' to exit
    app.Run();
    DisableBuffering(); // only for convenience...
}