MinGfx Toolkit  1.0
A minimal library for writing cross-platform (Windows, OSX, linux) graphics programs.
opengl_headers.h
Go to the documentation of this file.
1 /*
2  This file is part of the MinGfx Project.
3 
4  Copyright (c) 2017,2018 Regents of the University of Minnesota.
5  All Rights Reserved.
6 
7  Original Author(s) of this File:
8  Dan Keefe, 2018, University of Minnesota
9 
10  Author(s) of Significant Updates/Modifications to the File:
11  ...
12  */
13 
14 // We often use the code that is commented out below to load opengl headers in a cross-platform way,
15 // but since nanogui uses glad internally, we will just use their approach to load opengl headers
16 // so that everything is consistent.
17 
18 // disable warnings for this 3rd party code
19 #pragma warning ( push, 0 )
20 #include <nanogui/opengl.h>
21 #pragma warning ( pop )
22 
23 
24 /*** Our typical (non-nanogui) appraoch:
25 
26 // GLEW is needed on Windows and Linux
27 #ifdef _WIN32
28 #include "GL/glew.h"
29 #include "GL/wglew.h"
30 #elif (!defined(__APPLE__))
31 #include "GL/glxew.h"
32 #endif
33 
34 // OpenGL Headers
35 #if defined(WIN32)
36 #define NOMINMAX
37 #include <windows.h>
38 #include <GL/gl.h>
39 #elif defined(__APPLE__)
40 #define GL_GLEXT_PROTOTYPES
41 #include <OpenGL/gl3.h>
42 #include <OpenGL/glext.h>
43 #else
44 #define GL_GLEXT_PROTOTYPES
45 #include <GL/gl.h>
46 #endif
47 
48 ***/