VTK  9.1.0
vtkOpenGL.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkOpenGL.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
15#ifndef vtkOpenGL_h
16#define vtkOpenGL_h
17
18#include "vtkRenderingOpenGLConfigure.h" // For VTK_USE_COCOA
19
20#if !defined(VTK_LEGACY_SILENT)
21#ifdef _MSC_VER
22#pragma message( \
23 "vtkOpenGL.h is deprecated. vtk_glew.h should be used if you require OpenGL headers.")
24#else
25#warning "vtkOpenGL.h is deprecated. vtk_glew.h should be used if you require OpenGL headers."
26#endif
27#endif
28
29// Must be included before `gl.h` due to glew.
30#include "vtkOpenGLError.h"
31
32// To prevent gl.h to include glext.h provided by the system
33#define GL_GLEXT_LEGACY
34#if defined(__APPLE__)
35#include <TargetConditionals.h>
36#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
37#include <ES3/gl.h> // Include OpenGL API.
38#elif TARGET_OS_MAC
39#include <OpenGL/gl.h> // Include OpenGL API.
40#endif
41#else
42#include "vtkWindows.h" // Needed to include OpenGL header on Windows.
43#include <GL/gl.h> // Include OpenGL API.
44#endif
45
46#endif
47// VTK-HeaderTest-Exclude: vtkOpenGL.h