aboutsummaryrefslogtreecommitdiffstats
path: root/dev/MinGfx/src/opengl_headers.h
blob: a2202778745a10d36d9ad4f5c5797147445a18be (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
 This file is part of the MinGfx Project.
 
 Copyright (c) 2017,2018 Regents of the University of Minnesota.
 All Rights Reserved.
 
 Original Author(s) of this File:
	Dan Keefe, 2018, University of Minnesota
	
 Author(s) of Significant Updates/Modifications to the File:
	...
 */

// We often use the code that is commented out below to load opengl headers in a cross-platform way,
// but since nanogui uses glad internally, we will just use their approach to load opengl headers
// so that everything is consistent.

// disable warnings for this 3rd party code
#pragma warning ( push, 0 )
#include <nanogui/opengl.h>
#pragma warning ( pop )


/*** Our typical (non-nanogui) appraoch:

// GLEW is needed on Windows and Linux
#ifdef _WIN32
#include "GL/glew.h"
#include "GL/wglew.h"
#elif (!defined(__APPLE__))
#include "GL/glxew.h"
#endif

// OpenGL Headers
#if defined(WIN32)
#define NOMINMAX
#include <windows.h>
#include <GL/gl.h>
#elif defined(__APPLE__)
#define GL_GLEXT_PROTOTYPES
#include <OpenGL/gl3.h>
#include <OpenGL/glext.h>
#else
#define GL_GLEXT_PROTOTYPES
#include <GL/gl.h>
#endif

***/