summaryrefslogtreecommitdiffstats
path: root/ui/gl/gl_bindings_autogen_osmesa.h
blob: 8a6bb6699a0804fc79a2143ba15cf6527c8eda00 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// This file is auto-generated from
// ui/gl/generate_bindings.py
// It's formatted by clang-format using chromium coding style:
//    clang-format -i -style=chromium filename
// DO NOT EDIT!

#ifndef UI_GFX_GL_GL_BINDINGS_AUTOGEN_OSMESA_H_
#define UI_GFX_GL_GL_BINDINGS_AUTOGEN_OSMESA_H_

namespace gfx {

class GLContext;

typedef void(GL_BINDING_CALL* OSMesaColorClampProc)(GLboolean enable);
typedef OSMesaContext(GL_BINDING_CALL* OSMesaCreateContextProc)(
    GLenum format,
    OSMesaContext sharelist);
typedef OSMesaContext(GL_BINDING_CALL* OSMesaCreateContextExtProc)(
    GLenum format,
    GLint depthBits,
    GLint stencilBits,
    GLint accumBits,
    OSMesaContext sharelist);
typedef void(GL_BINDING_CALL* OSMesaDestroyContextProc)(OSMesaContext ctx);
typedef GLboolean(GL_BINDING_CALL* OSMesaGetColorBufferProc)(OSMesaContext c,
                                                             GLint* width,
                                                             GLint* height,
                                                             GLint* format,
                                                             void** buffer);
typedef OSMesaContext(GL_BINDING_CALL* OSMesaGetCurrentContextProc)(void);
typedef GLboolean(GL_BINDING_CALL* OSMesaGetDepthBufferProc)(
    OSMesaContext c,
    GLint* width,
    GLint* height,
    GLint* bytesPerValue,
    void** buffer);
typedef void(GL_BINDING_CALL* OSMesaGetIntegervProc)(GLint pname, GLint* value);
typedef OSMESAproc(GL_BINDING_CALL* OSMesaGetProcAddressProc)(
    const char* funcName);
typedef GLboolean(GL_BINDING_CALL* OSMesaMakeCurrentProc)(OSMesaContext ctx,
                                                          void* buffer,
                                                          GLenum type,
                                                          GLsizei width,
                                                          GLsizei height);
typedef void(GL_BINDING_CALL* OSMesaPixelStoreProc)(GLint pname, GLint value);

struct ExtensionsOSMESA {};

struct ProcsOSMESA {
  OSMesaColorClampProc OSMesaColorClampFn;
  OSMesaCreateContextProc OSMesaCreateContextFn;
  OSMesaCreateContextExtProc OSMesaCreateContextExtFn;
  OSMesaDestroyContextProc OSMesaDestroyContextFn;
  OSMesaGetColorBufferProc OSMesaGetColorBufferFn;
  OSMesaGetCurrentContextProc OSMesaGetCurrentContextFn;
  OSMesaGetDepthBufferProc OSMesaGetDepthBufferFn;
  OSMesaGetIntegervProc OSMesaGetIntegervFn;
  OSMesaGetProcAddressProc OSMesaGetProcAddressFn;
  OSMesaMakeCurrentProc OSMesaMakeCurrentFn;
  OSMesaPixelStoreProc OSMesaPixelStoreFn;
};

class GL_EXPORT OSMESAApi {
 public:
  OSMESAApi();
  virtual ~OSMESAApi();

  virtual void OSMesaColorClampFn(GLboolean enable) = 0;
  virtual OSMesaContext OSMesaCreateContextFn(GLenum format,
                                              OSMesaContext sharelist) = 0;
  virtual OSMesaContext OSMesaCreateContextExtFn(GLenum format,
                                                 GLint depthBits,
                                                 GLint stencilBits,
                                                 GLint accumBits,
                                                 OSMesaContext sharelist) = 0;
  virtual void OSMesaDestroyContextFn(OSMesaContext ctx) = 0;
  virtual GLboolean OSMesaGetColorBufferFn(OSMesaContext c,
                                           GLint* width,
                                           GLint* height,
                                           GLint* format,
                                           void** buffer) = 0;
  virtual OSMesaContext OSMesaGetCurrentContextFn(void) = 0;
  virtual GLboolean OSMesaGetDepthBufferFn(OSMesaContext c,
                                           GLint* width,
                                           GLint* height,
                                           GLint* bytesPerValue,
                                           void** buffer) = 0;
  virtual void OSMesaGetIntegervFn(GLint pname, GLint* value) = 0;
  virtual OSMESAproc OSMesaGetProcAddressFn(const char* funcName) = 0;
  virtual GLboolean OSMesaMakeCurrentFn(OSMesaContext ctx,
                                        void* buffer,
                                        GLenum type,
                                        GLsizei width,
                                        GLsizei height) = 0;
  virtual void OSMesaPixelStoreFn(GLint pname, GLint value) = 0;
};

}  // namespace gfx

#define OSMesaColorClamp ::gfx::g_current_osmesa_context->OSMesaColorClampFn
#define OSMesaCreateContext \
  ::gfx::g_current_osmesa_context->OSMesaCreateContextFn
#define OSMesaCreateContextExt \
  ::gfx::g_current_osmesa_context->OSMesaCreateContextExtFn
#define OSMesaDestroyContext \
  ::gfx::g_current_osmesa_context->OSMesaDestroyContextFn
#define OSMesaGetColorBuffer \
  ::gfx::g_current_osmesa_context->OSMesaGetColorBufferFn
#define OSMesaGetCurrentContext \
  ::gfx::g_current_osmesa_context->OSMesaGetCurrentContextFn
#define OSMesaGetDepthBuffer \
  ::gfx::g_current_osmesa_context->OSMesaGetDepthBufferFn
#define OSMesaGetIntegerv ::gfx::g_current_osmesa_context->OSMesaGetIntegervFn
#define OSMesaGetProcAddress \
  ::gfx::g_current_osmesa_context->OSMesaGetProcAddressFn
#define OSMesaMakeCurrent ::gfx::g_current_osmesa_context->OSMesaMakeCurrentFn
#define OSMesaPixelStore ::gfx::g_current_osmesa_context->OSMesaPixelStoreFn

#endif  //  UI_GFX_GL_GL_BINDINGS_AUTOGEN_OSMESA_H_