Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TGLIncludes.h
Go to the documentation of this file.
1// @(#)root/gl:$Id$
2// Authors: Timur and Matevz, May 2008
3
4/*************************************************************************
5 * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TGLIncludes
13#define ROOT_TGLIncludes
14
15// GL includes - include this if you are calling OpenGL functions.
16
17#ifdef WIN32
18#include "Windows4Root.h"
19#endif
20
21#include <glad/gl.h>
22
23// This used to be included through glew.h.
24#if defined(__APPLE__) && defined(__MACH__)
25# include <OpenGL/glu.h>
26#else
27# include <GL/glu.h>
28#endif
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34// Wrapper functions fixing an issue with several glad functions not compatible with gluTessCallback.
35// This is visible with the tutorial grad.C, not rendering the color gradients
36[[maybe_unused]]
37static void impl_glBegin(GLenum mode) {
38 glBegin(mode);
39}
40[[maybe_unused]]
41static void impl_glEnd(void) {
42 glEnd();
43}
44[[maybe_unused]]
45static void impl_glVertex3fv(const GLfloat * v) {
47}
48[[maybe_unused]]
49static void impl_glVertex3dv(const GLdouble * v) {
51}
52[[maybe_unused]]
53static void impl_glVertex4fv(const GLfloat * v) {
55}
56[[maybe_unused]]
57static void impl_glVertex4dv(const GLdouble * v) {
59}
60
61#ifdef __cplusplus
62}
63#endif
64
65#endif
static void impl_glEnd(void)
Definition TGLIncludes.h:41
static void impl_glVertex3dv(const GLdouble *v)
Definition TGLIncludes.h:49
static void impl_glVertex4fv(const GLfloat *v)
Definition TGLIncludes.h:53
static void impl_glBegin(GLenum mode)
Definition TGLIncludes.h:37
static void impl_glVertex4dv(const GLdouble *v)
Definition TGLIncludes.h:57
static void impl_glVertex3fv(const GLfloat *v)
Definition TGLIncludes.h:45
#define glBegin
Definition gl.h:3262
#define glVertex4fv
Definition gl.h:5142
double GLdouble
Definition gl.h:2075
unsigned int GLenum
Definition gl.h:2061
khronos_float_t GLfloat
Definition gl.h:2073
#define glEnd
Definition gl.h:3684
#define glVertex3fv
Definition gl.h:5126
#define glVertex4dv
Definition gl.h:5138
#define glVertex3dv
Definition gl.h:5122