iPlug2 - C++ Audio Plug-in Framework
IGraphics_include_in_plug_hdr.h
Go to the documentation of this file.
1 /*
2  ==============================================================================
3 
4  This file is part of the iPlug 2 library. Copyright (C) the iPlug 2 developers.
5 
6  See LICENSE.txt for more info.
7 
8  ==============================================================================
9 */
10 
11 #ifndef __IGRAPHICS_HDR_INC__
12 #define __IGRAPHICS_HDR_INC__
13 
20 #include "IPlugPlatform.h"
21 
22 #ifndef NO_IGRAPHICS
23 
24 #if defined IGRAPHICS_GLES2
25  #if defined OS_IOS
26  #include <OpenGLES/ES2/gl.h>
27  #elif defined OS_WEB
28  #include <GLES2/gl2.h>
29  #endif
30 #elif defined IGRAPHICS_GLES3
31  #if defined OS_IOS
32  #include <OpenGLES/ES3/gl.h>
33  #elif defined OS_WEB
34  #include <GLES3/gl3.h>
35  #endif
36 #elif defined IGRAPHICS_GL2 || defined IGRAPHICS_GL3
37  #if defined OS_WIN
38  #include <glad/glad.h>
39  #elif defined OS_MAC
40  #if defined IGRAPHICS_GL2
41  #include <OpenGL/gl.h>
42  #elif defined IGRAPHICS_GL3
43  #include <OpenGL/gl3.h>
44  #endif
45  #else
46  #include <OpenGL/gl.h>
47  #endif
48 #endif
49 
50 #ifdef OS_WIN
51  #include "IGraphicsWin.h"
52 #elif defined OS_MAC
53  #include "IGraphicsMac.h"
54 #elif defined OS_IOS
55  #include "IGraphicsIOS.h"
56 #elif defined OS_LINUX
57  #include "IGraphicsLinux.h"
58 #elif defined OS_WEB
59  #include "IGraphicsWeb.h"
60 #endif
61 
62 //TODO: move this
63 #if !defined OS_IOS
64 
68 static float GetScaleForScreen(int width, int height) { return 1.f; }
69 #endif
70 
71 #endif // NO_IGRAPHICS
72 
73 #endif //__IGRAPHICS_HDR_INC__
Include to get consistently named preprocessor macros for different platforms and logging functionali...