blob: 09dce653fc5ee60319dac6209b8efe5c603015f4 (
plain)
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
|
/*
* Copyright (C) 2005-2018 Team Kodi
* This file is part of Kodi - https://kodi.tv
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSES/README.md for more information.
*/
#pragma once
#ifdef HAS_GL
// always define GL_GLEXT_PROTOTYPES before include gl headers
#if !defined(GL_GLEXT_PROTOTYPES)
#define GL_GLEXT_PROTOTYPES
#endif
#if defined(TARGET_LINUX)
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glext.h>
#elif defined(TARGET_FREEBSD)
#include <GL/gl.h>
#include <GL/glu.h>
#elif defined(TARGET_DARWIN)
#include <OpenGL/gl3.h>
#include <OpenGL/glu.h>
#include <OpenGL/gl3ext.h>
#endif
#elif HAS_GLES >= 2
#if defined(TARGET_DARWIN)
#include <OpenGLES/ES2/gl.h>
#include <OpenGLES/ES2/glext.h>
#else
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#endif
#if HAS_GLES == 3
#include <GLES3/gl3.h>
#endif
#endif
// Useful pixel colour manipulation macros
#define GET_A(color) ((color >> 24) & 0xFF)
#define GET_R(color) ((color >> 16) & 0xFF)
#define GET_G(color) ((color >> 8) & 0xFF)
#define GET_B(color) ((color >> 0) & 0xFF)
|