Debian Codegraph @

libs/bluegl/tests/OpenGLSupport.hpp

raw
1 /*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #ifndef __BLUE_GL_OPENGL_SUPPORT_HPP__
18 #define __BLUE_GL_OPENGL_SUPPORT_HPP__
19
20 namespace bluegl {
21 namespace gl {
22
23 typedef void* OpenGLContext;
24
25 /**
26 * Creates a new OpenGL context.
27 *
28 * @return an OpenGLContext object that represents the newly created
29 * OpenGL context or nullptr if the context cannot be created
30 */
31 OpenGLContext createOpenGLContext();
32
33 /**
34 * Makes the specified context the current OpenGL context on the
35 * current thread.
36 *
37 * @param context the OpenGLContext to become current
38 */
39 void setCurrentOpenGLContext(OpenGLContext context);
40
41 /**
42 * Destroys the specified OpenGL context.
43 *
44 * @param context the OpenGLContext to destroy
45 */
46 void destroyOpenGLContext(OpenGLContext context);
47
48 }; // namespace gl
49 }; // namespace bluegl
50
51 #endif // __BLUE_GL_OPENGL_SUPPORT_HPP__