VTK  9.0.20201125
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__) && defined(VTK_USE_COCOA)
35 #include <OpenGL/gl.h> // Include OpenGL API.
36 #else
37 #include "vtkWindows.h" // Needed to include OpenGL header on Windows.
38 #include <GL/gl.h> // Include OpenGL API.
39 #endif
40 
41 #endif
42 // VTK-HeaderTest-Exclude: vtkOpenGL.h