Bumping gaia.json for 2 gaia revision(s) a=gaia-bump
[gecko.git] / gfx / gl / GLContextTypes.h
blob1cdc12aeb220e5603e4b04aae954896f45c1bc1e
1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef GLCONTEXT_TYPES_H_
7 #define GLCONTEXT_TYPES_H_
9 #include "GLTypes.h"
10 #include "mozilla/TypedEnum.h"
12 namespace mozilla {
13 namespace gl {
15 class GLContext;
17 MOZ_BEGIN_ENUM_CLASS(GLContextType)
18 Unknown,
19 WGL,
20 CGL,
21 GLX,
22 EGL
23 MOZ_END_ENUM_CLASS(GLContextType)
25 MOZ_BEGIN_ENUM_CLASS(OriginPos, uint8_t)
26 TopLeft,
27 BottomLeft
28 MOZ_END_ENUM_CLASS(OriginPos)
30 struct GLFormats
32 // Constructs a zeroed object:
33 GLFormats();
35 GLenum color_texInternalFormat;
36 GLenum color_texFormat;
37 GLenum color_texType;
38 GLenum color_rbFormat;
40 GLenum depthStencil;
41 GLenum depth;
42 GLenum stencil;
44 GLsizei samples;
47 struct PixelBufferFormat
49 // Constructs a zeroed object:
50 PixelBufferFormat();
52 int red, green, blue;
53 int alpha;
54 int depth, stencil;
55 int samples;
57 int ColorBits() const { return red + green + blue; }
60 } /* namespace gl */
61 } /* namespace mozilla */
63 #endif /* GLCONTEXT_TYPES_H_ */