2012-12-18 05:58:44 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
2013-02-14 03:26:24 +04:00
|
|
|
#ifndef GLCONTEXT_TYPES_H_
|
|
|
|
#define GLCONTEXT_TYPES_H_
|
2012-12-18 05:58:44 +04:00
|
|
|
|
2013-09-04 16:14:52 +04:00
|
|
|
#include "GLTypes.h"
|
2015-09-24 22:21:05 +03:00
|
|
|
#include "mozilla/TypedEnumBits.h"
|
2012-12-18 05:58:44 +04:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace gl {
|
|
|
|
|
2013-09-04 16:14:52 +04:00
|
|
|
class GLContext;
|
|
|
|
|
2015-01-26 01:22:07 +03:00
|
|
|
enum class GLContextType {
|
2014-01-10 22:55:24 +04:00
|
|
|
Unknown,
|
|
|
|
WGL,
|
|
|
|
CGL,
|
|
|
|
GLX,
|
2015-09-29 01:09:56 +03:00
|
|
|
EGL,
|
|
|
|
EAGL
|
2015-01-26 01:22:07 +03:00
|
|
|
};
|
2013-09-04 16:14:52 +04:00
|
|
|
|
2015-01-26 01:22:07 +03:00
|
|
|
enum class OriginPos : uint8_t {
|
2014-11-18 04:02:19 +03:00
|
|
|
TopLeft,
|
|
|
|
BottomLeft
|
2015-01-26 01:22:07 +03:00
|
|
|
};
|
2014-11-18 04:02:19 +03:00
|
|
|
|
2013-02-14 03:26:24 +04:00
|
|
|
struct GLFormats
|
|
|
|
{
|
|
|
|
// Constructs a zeroed object:
|
|
|
|
GLFormats();
|
2012-12-18 05:58:44 +04:00
|
|
|
|
2013-02-14 03:26:24 +04:00
|
|
|
GLenum color_texInternalFormat;
|
|
|
|
GLenum color_texFormat;
|
|
|
|
GLenum color_texType;
|
|
|
|
GLenum color_rbFormat;
|
|
|
|
|
|
|
|
GLenum depthStencil;
|
|
|
|
GLenum depth;
|
|
|
|
GLenum stencil;
|
|
|
|
|
|
|
|
GLsizei samples;
|
|
|
|
};
|
|
|
|
|
2015-09-24 22:21:05 +03:00
|
|
|
enum class CreateContextFlags : int8_t {
|
|
|
|
NONE = 0,
|
|
|
|
REQUIRE_COMPAT_PROFILE = 1 << 0,
|
|
|
|
// Force the use of hardware backed GL, don't allow software implementations.
|
|
|
|
FORCE_ENABLE_HARDWARE = 1 << 1,
|
|
|
|
/* Don't force discrete GPU to be used (if applicable) */
|
|
|
|
ALLOW_OFFLINE_RENDERER = 1 << 2,
|
|
|
|
};
|
|
|
|
MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(CreateContextFlags)
|
|
|
|
|
2013-02-14 03:26:24 +04:00
|
|
|
} /* namespace gl */
|
|
|
|
} /* namespace mozilla */
|
|
|
|
|
|
|
|
#endif /* GLCONTEXT_TYPES_H_ */
|