OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #ifndef GrGLFunctions_DEFINED | 9 #ifndef GrGLFunctions_DEFINED |
10 #define GrGLFunctions_DEFINED | 10 #define GrGLFunctions_DEFINED |
11 | 11 |
12 #include "GrGLConfig.h" | 12 #include "GrGLTypes.h" |
13 | |
14 | 13 |
15 extern "C" { | 14 extern "C" { |
16 | 15 |
17 //////////////////////////////////////////////////////////////////////////////// | |
18 | |
19 /** | |
20 * Classifies GL contexts by which standard they implement (currently as Desktop | |
21 * vs. ES). | |
22 */ | |
23 enum GrGLStandard { | |
24 kNone_GrGLStandard, | |
25 kGL_GrGLStandard, | |
26 kGLES_GrGLStandard, | |
27 }; | |
28 static const int kGrGLStandardCnt = 3; | |
29 | |
30 /////////////////////////////////////////////////////////////////////////////// | |
31 | |
32 /** | |
33 * Declares typedefs for all the GL functions used in GrGLInterface | |
34 */ | |
35 | |
36 typedef unsigned int GrGLenum; | |
37 typedef unsigned char GrGLboolean; | |
38 typedef unsigned int GrGLbitfield; | |
39 typedef signed char GrGLbyte; | |
40 typedef char GrGLchar; | |
41 typedef short GrGLshort; | |
42 typedef int GrGLint; | |
43 typedef int GrGLsizei; | |
44 typedef int64_t GrGLint64; | |
45 typedef unsigned char GrGLubyte; | |
46 typedef unsigned short GrGLushort; | |
47 typedef unsigned int GrGLuint; | |
48 typedef uint64_t GrGLuint64; | |
49 typedef float GrGLfloat; | |
50 typedef float GrGLclampf; | |
51 typedef double GrGLdouble; | |
52 typedef double GrGLclampd; | |
53 typedef void GrGLvoid; | |
54 #ifndef SK_IGNORE_64BIT_OPENGL_CHANGES | |
55 #ifdef _WIN64 | |
56 typedef signed long long int GrGLintptr; | |
57 typedef signed long long int GrGLsizeiptr; | |
58 #else | |
59 typedef signed long int GrGLintptr; | |
60 typedef signed long int GrGLsizeiptr; | |
61 #endif | |
62 #else | |
63 typedef signed long int GrGLintptr; | |
64 typedef signed long int GrGLsizeiptr; | |
65 #endif | |
66 | |
67 typedef void (GR_GL_FUNCTION_TYPE* GRGLDEBUGPROC)(GrGLenum source, | 16 typedef void (GR_GL_FUNCTION_TYPE* GRGLDEBUGPROC)(GrGLenum source, |
68 GrGLenum type, | 17 GrGLenum type, |
69 GrGLuint id, | 18 GrGLuint id, |
70 GrGLenum severity, | 19 GrGLenum severity, |
71 GrGLsizei length, | 20 GrGLsizei length, |
72 const GrGLchar* message, | 21 const GrGLchar* message, |
73 const void* userParam); | 22 const void* userParam); |
74 | 23 |
75 /////////////////////////////////////////////////////////////////////////////// | 24 /////////////////////////////////////////////////////////////////////////////// |
76 | 25 |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLDebugMessageInsertProc)(GrGLenum sour
ce, GrGLenum type, GrGLuint id, GrGLenum severity, GrGLsizei length, const GrGL
char* buf); | 347 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLDebugMessageInsertProc)(GrGLenum sour
ce, GrGLenum type, GrGLuint id, GrGLenum severity, GrGLsizei length, const GrGL
char* buf); |
399 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLDebugMessageCallbackProc)(GRGLDEBUGPR
OC callback, const GrGLvoid* userParam); | 348 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLDebugMessageCallbackProc)(GRGLDEBUGPR
OC callback, const GrGLvoid* userParam); |
400 typedef GrGLuint (GR_GL_FUNCTION_TYPE* GrGLGetDebugMessageLogProc)(GrGLuint coun
t, GrGLsizei bufSize, GrGLenum* sources, GrGLenum* types, GrGLuint* ids, GrGLenu
m* severities, GrGLsizei* lengths, GrGLchar* messageLog); | 349 typedef GrGLuint (GR_GL_FUNCTION_TYPE* GrGLGetDebugMessageLogProc)(GrGLuint coun
t, GrGLsizei bufSize, GrGLenum* sources, GrGLenum* types, GrGLuint* ids, GrGLenu
m* severities, GrGLsizei* lengths, GrGLchar* messageLog); |
401 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLPushDebugGroupProc)(GrGLenum source,
GrGLuint id, GrGLsizei length, const GrGLchar * message); | 350 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLPushDebugGroupProc)(GrGLenum source,
GrGLuint id, GrGLsizei length, const GrGLchar * message); |
402 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLPopDebugGroupProc)(); | 351 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLPopDebugGroupProc)(); |
403 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLObjectLabelProc)(GrGLenum identifier,
GrGLuint name, GrGLsizei length, const GrGLchar *label); | 352 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLObjectLabelProc)(GrGLenum identifier,
GrGLuint name, GrGLsizei length, const GrGLchar *label); |
404 | 353 |
405 } // extern "C" | 354 } // extern "C" |
406 | 355 |
407 #endif | 356 #endif |
OLD | NEW |