blob: 0a6bf8c922b8bce9c5503a9bd0dead638c17d60a (
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
|
// Copyright (c) 2012 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.
#include "ui/gl/gl_gl_api_implementation.h"
namespace gfx {
RealGLApi* g_real_gl;
void InitializeGLBindingsGL() {
g_driver_gl.InitializeBindings();
if (!g_real_gl) {
g_real_gl = new RealGLApi();
}
g_real_gl->Initialize(&g_driver_gl);
g_current_gl_context = g_real_gl;
}
void InitializeGLExtensionBindingsGL(GLContext* context) {
g_driver_gl.InitializeExtensionBindings(context);
}
void InitializeDebugGLBindingsGL() {
g_driver_gl.InitializeDebugBindings();
}
void ClearGLBindingsGL() {
if (g_real_gl) {
delete g_real_gl;
g_real_gl = NULL;
}
g_current_gl_context = NULL;
g_driver_gl.ClearBindings();
}
GLApi::GLApi() {
}
GLApi::~GLApi() {
}
RealGLApi::RealGLApi() {
}
void RealGLApi::Initialize(DriverGL* driver) {
driver_ = driver;
}
} // namespace gfx
|