michael@0: /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef GLCONTEXT_TYPES_H_ michael@0: #define GLCONTEXT_TYPES_H_ michael@0: michael@0: #include "GLTypes.h" michael@0: #include "mozilla/TypedEnum.h" michael@0: michael@0: namespace mozilla { michael@0: namespace gl { michael@0: michael@0: class GLContext; michael@0: michael@0: typedef uintptr_t SharedTextureHandle; michael@0: michael@0: MOZ_BEGIN_ENUM_CLASS(SharedTextureShareType) michael@0: SameProcess = 0, michael@0: CrossProcess michael@0: MOZ_END_ENUM_CLASS(SharedTextureShareType) michael@0: michael@0: MOZ_BEGIN_ENUM_CLASS(SharedTextureBufferType) michael@0: TextureID, michael@0: SurfaceTexture, michael@0: IOSurface michael@0: MOZ_END_ENUM_CLASS(SharedTextureBufferType) michael@0: michael@0: MOZ_BEGIN_ENUM_CLASS(GLContextType) michael@0: Unknown, michael@0: WGL, michael@0: CGL, michael@0: GLX, michael@0: EGL michael@0: MOZ_END_ENUM_CLASS(GLContextType) michael@0: michael@0: struct GLFormats michael@0: { michael@0: // Constructs a zeroed object: michael@0: GLFormats(); michael@0: michael@0: GLenum color_texInternalFormat; michael@0: GLenum color_texFormat; michael@0: GLenum color_texType; michael@0: GLenum color_rbFormat; michael@0: michael@0: GLenum depthStencil; michael@0: GLenum depth; michael@0: GLenum stencil; michael@0: michael@0: GLsizei samples; michael@0: }; michael@0: michael@0: michael@0: struct PixelBufferFormat michael@0: { michael@0: // Constructs a zeroed object: michael@0: PixelBufferFormat(); michael@0: michael@0: int red, green, blue; michael@0: int alpha; michael@0: int depth, stencil; michael@0: int samples; michael@0: michael@0: int ColorBits() const { return red + green + blue; } michael@0: }; michael@0: michael@0: michael@0: } /* namespace gl */ michael@0: } /* namespace mozilla */ michael@0: michael@0: #endif /* GLCONTEXT_TYPES_H_ */