iPlug2 - C++ Audio Plug-in Framework
Loading...
Searching...
No Matches
IGraphics_select.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
16#if !defined DOXYGEN_SHOULD_SKIP_THIS
17
18 #include "IPlugPlatform.h"
19
20 #if defined IGRAPHICS_GLES2
21 #define IGRAPHICS_GL
22 #if defined OS_IOS
23 #include <OpenGLES/ES2/gl.h>
24 #elif defined OS_WEB
25 #include <GLES2/gl2.h>
26 #endif
27 #elif defined IGRAPHICS_GLES3
28 #define IGRAPHICS_GL
29 #if defined OS_IOS
30 #include <OpenGLES/ES3/gl.h>
31 #elif defined OS_WEB
32 #include <GLES3/gl3.h>
33 #endif
34 #elif defined IGRAPHICS_GL2 || defined IGRAPHICS_GL3
35 #define IGRAPHICS_GL
36 #if defined OS_WIN
37 #include <glad/glad.h>
38 #elif defined OS_MAC
39 #if defined IGRAPHICS_GL2
40 #include <OpenGL/gl.h>
41 #elif defined IGRAPHICS_GL3
42 #include <OpenGL/gl3.h>
43 #endif
44 #else
45 #include <OpenGL/gl.h>
46 #endif
47 #endif
48
49 #if defined IGRAPHICS_NANOVG
50 #include "IGraphicsNanoVG.h"
51 #define IGRAPHICS_DRAW_CLASS_TYPE IGraphicsNanoVG
52 #elif defined IGRAPHICS_SKIA
53 #include "IGraphicsSkia.h"
54 #define IGRAPHICS_DRAW_CLASS_TYPE IGraphicsSkia
55 #elif defined IGRAPHICS_CANVAS
56 #include "IGraphicsCanvas.h"
57 #define IGRAPHICS_DRAW_CLASS_TYPE IGraphicsCanvas
58 #if defined IGRAPHICS_GL || defined IGRAPHICS_METAL
59 #error When using IGRAPHICS_CANVAS, don't define IGRAPHICS_METAL or IGRAPHICS_GL*
60 #endif
61 #else
62 #error NO IGRAPHICS_MODE defined
63 #endif
64#endif
65
66BEGIN_IPLUG_NAMESPACE
67BEGIN_IGRAPHICS_NAMESPACE
68using IGRAPHICS_DRAW_CLASS = IGRAPHICS_DRAW_CLASS_TYPE;
69END_IGRAPHICS_NAMESPACE
70END_IPLUG_NAMESPACE
71
Include to get consistently named preprocessor macros for different platforms and logging functionali...