1#ifndef SO@GUI@_GL_H
2#define SO@GUI@_GL_H
3
4// @configure_input@
5
6/**************************************************************************\
7 *
8 *  This file is part of the Coin 3D visualization library.
9 *  Copyright (C) by Kongsberg Oil & Gas Technologies.
10 *
11 *  This library is free software; you can redistribute it and/or
12 *  modify it under the terms of the GNU General Public License
13 *  ("GPL") version 2 as published by the Free Software Foundation.
14 *  See the file LICENSE.GPL at the root directory of this source
15 *  distribution for additional information about the GNU GPL.
16 *
17 *  For using Coin with software that can not be combined with the GNU
18 *  GPL, and for taking advantage of the additional benefits of our
19 *  support services, please contact Kongsberg Oil & Gas Technologies
20 *  about acquiring a Coin Professional Edition License.
21 *
22 *  See http://www.coin3d.org/ for more information.
23 *
24 *  Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
25 *  http://www.sim.no/  sales@sim.no  coin-support@coin3d.org
26 *
27\**************************************************************************/
28
29/* This header file is supposed to take care of all operating system
30 * dependent anomalies connected to the gl.h include file.  It is only
31 * for use while building the Coin library, and should not be installed
32 * with the rest of the header files (at least not yet).  20010913 larsa */
33
34#ifndef SO@GUI@_VERSION
35#error "you must include config.h before including Inventor/system/gl.h"
36#endif /* !SO@GUI_VERSION */
37
38#ifdef HAVE_WINDOWS_H
39/* on windows, headers do not include their dependencies */
40#include <windows.h>
41#endif /* HAVE_WINDOWS_H */
42
43#ifdef HAVE_GL_GL_H
44/* the preferred gl.h path */
45#include <GL/gl.h>
46#else
47#ifdef HAVE_OPENGL_GL_H
48/* how Mac OS X organizes things - should we now stuff Coin header in
49   OpenInventor/?  (that *was* irony) */
50#include <OpenGL/gl.h>
51#else
52#error "don't know how to include gl.h header"
53#endif /* !HAVE_GL_GL_H */
54#endif /* !HAVE_OPENGL_GL_H */
55
56#ifdef HAVE_GL_GLU_H
57#include <GL/glu.h>
58#else
59#ifdef HAVE_OPENGL_GLU_H
60#include <OpenGL/glu.h>
61#endif
62#endif
63
64/*
65  At least MS Windows often has very old gl.h files, so we just define
66  these values here if not defined already. Run-time checks are used
67  to determine which feature to use.
68*/
69
70#ifndef GL_CLAMP_TO_EDGE
71#define GL_CLAMP_TO_EDGE         0x812F
72#endif /* GL_CLAMP_TO_EDGE */
73
74#ifndef GL_CLAMP_TO_EDGE_EXT
75#define GL_CLAMP_TO_EDGE_EXT     0x812F
76#endif /* GL_CLAMP_TO_EDGE_EXT */
77
78#ifndef GL_CLAMP_TO_EDGE_SGIS
79#define GL_CLAMP_TO_EDGE_SGIS    0x812F
80#endif /* GL_CLAMP_TO_EDGE_SGIS */
81
82#endif /* ! COIN_GL_H */
83