/*****************************************************************************
 * $Id: gfx.hh,v 1.61 2006/08/10 03:18:58 devel Exp $
 * @file
 * @author	Jim E. Brooks  http://www.jimbrooks.org
 * @brief	Main header file.
 *//*
 * LEGAL:	COPYRIGHT (C) 2004 JIM E. BROOKS
 *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
 *          OF THE GNU GENERAL PUBLIC LICENSE (GPL).
 *****************************************************************************/

#ifndef GFX_HH
#define GFX_HH 1

//------------------------------------------------------------------------------

#if defined(_WIN32)
#include "gfx_win32.hh"
#endif

// Include graphics system header files.
#if GFXSYS_OPENGL
#   ifndef GL_GLEXT_PROTOTYPES
#       define GL_GLEXT_PROTOTYPES 1  // Kludge?  Or does OpenGL require apps to define it?
#   endif
#	ifdef __APPLE_CC__
#		include <GLUT/glut.h>
#   else
#		include <GL/glut.h>
#   endif
// No new OpenGL extensions are actually used, rather,
// standard features in recent OpenGL were once extensions.
#include <GL/gl.h>
#include <GL/glext.h>
#endif

// Whether to use zlib/gzip compression.
#ifndef GFX_ZLIB
#define GFX_ZLIB 1
#endif

// These header files are usually needed.
#include "gfx_assert.hh"
#include "gfx_cc.hh"
#include "gfx_os.hh"
#include "gfx_defs.hh"
#include "gfx_funcs.hh"
#include "gfx_typesig_defs.hh"
#include "gfx_typesig.hh"
#include "gfx_types.hh"
#include "gfx_ptr.hh"
#include "gfx_funcs2.hh"

//------------------------------------------------------------------------------

namespace gfx {

extern bool gExitingGfx;

bool
GFX_INIT( const string& appname );

void
GFX_CLEANUP( void );

void
GFX_SET_APPNAME( const string& appname );

string
GFX_GET_APPNAME( void );

#if GFX_CC

static void
GfxOpenStreams( void );

static void
GfxCloseStreams( void );

#endif // GFX_CC

// Streams for printing to console.
extern ostream* gStreamOut;
extern ostream* gStreamError;
extern ostream* gStreamDebug;

} // namespace gfx

//------------------------------------------------------------------------------

#endif // GFX_HH
 
// For public release (release_palomino.sh)
#ifndef PUBLIC_RELEASE
#define PUBLIC_RELEASE 1
#endif
