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
|
#pragma once
#include <mbgl/gl/features.hpp>
#include <mbgl/gl/extension.hpp>
#include <mbgl/gl/defines.hpp>
#if MBGL_HAS_BINARY_PROGRAMS
#define GL_PROGRAM_BINARY_LENGTH 0x8741
#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE
#define GL_PROGRAM_BINARY_FORMATS 0x87FF
namespace mbgl {
namespace gl {
namespace extension {
class ProgramBinary {
public:
template <typename Fn>
ProgramBinary(const Fn& loadExtension)
: getProgramBinary(loadExtension({
{ "GL_OES_get_program_binary", "glGetProgramBinaryOES" },
{ "GL_ARB_get_program_binary", "glGetProgramBinary" },
})),
programBinary(loadExtension({
{ "GL_OES_get_program_binary", "glProgramBinaryOES" },
{ "GL_ARB_get_program_binary", "glProgramBinary" },
})) {
}
const ExtensionFunction<void(
GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary)>
getProgramBinary;
const ExtensionFunction<void(
GLuint program, GLenum binaryFormat, const GLvoid* binary, GLint length)>
programBinary;
};
} // namespace extension
} // namespace gl
} // namespace mbgl
#endif
|