/* * $Id$ * * $Date$ * $Revision$ * * (C) 1999 by Hyperion * All rights reserved * * This file is part of the MiniGL library project * See the file Licence.txt for more details * */ #ifndef __MINIGL_COMPILER_H #define __MINIGL_COMPILER_H #define __NOGLOBALIFACE__ extern struct Library *Warp3DBase; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "mgl/config.h" extern struct ExecIFace *IExec; extern struct DOSIFace *IDOS; extern struct Library *UtilityBase; extern struct UtilityIFace *IUtility; extern struct Library *IntuitionBase; extern struct IntuitionIFace *IIntuition; extern struct Library *GfxBase; extern struct GraphicsIFace *IGraphics; extern struct Library *Warp3DBase; extern struct Warp3DIFace *IWarp3D; extern struct Library *P96Base; extern struct P96IFace *IP96; extern struct Device *TimerBase; extern struct TimerIFace *ITimer; #ifndef UNUSED #if defined(__GNUC__) #define UNUSED __attribute__ ((unused)) #else #define UNUSED #endif #endif #ifndef GLNDEBUG #warning "Debug output enabled" #define GLASSERT(c) if (!(c)) dprintf("Assertion failed %s\n", # c); #define dprintf(format, args...)((struct ExecIFace *)((*(struct ExecBase **)4)->MainInterface))->DebugPrintF("[%s] " format, __PRETTY_FUNCTION__ , ## args) #define kprintf(format, args...)((struct ExecIFace *)((*(struct ExecBase **)4)->MainInterface))->DebugPrintF(format, ## args) #else #define GLASSERT(c) #define dprintf(x, args...) #define kprintf(x, args...) #endif #ifndef GL_NOERRORCHECK #define GLFlagError(context,c,err) \ while ((c)) {\ kprintf("FlagError in %s:%ld, error = %s\n", __PRETTY_FUNCTION__, __LINE__, #err);\ context->CurrentError = err;\ return;\ } #define GLFlagError2(context,c,err,ret) \ while ((c)) {\ kprintf("FlagError in %s:%ld, error = %s\n", __PRETTY_FUNCTION__, __LINE__, #err);\ context->CurrentError = err;\ return ret;\ } #else #define GLFlagError(context,c,err) #define GLFlagError2(context,c,err,ret) #endif #ifndef GET_INSTANCE #define GET_INSTANCE(self) \ (GLcontext)((uint32)self - self->Data.NegativeSize) #endif #include "GL/gl.h" #include "GL/glext.h" #include "mgl/matrix.h" #endif