michael@0: /* -*- Mode: C++; tab-width: 4; 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 WEBGLFRAMEBUFFERATTACHABLE_H_ michael@0: #define WEBGLFRAMEBUFFERATTACHABLE_H_ michael@0: michael@0: #include "GLDefs.h" michael@0: #include "mozilla/Vector.h" michael@0: michael@0: namespace mozilla { michael@0: michael@0: class WebGLFramebuffer; michael@0: michael@0: class WebGLFramebufferAttachable michael@0: { michael@0: struct AttachmentPoint michael@0: { michael@0: AttachmentPoint(const WebGLFramebuffer* fb, GLenum attachment) michael@0: : mFB(fb) michael@0: , mAttachment(attachment) michael@0: {} michael@0: michael@0: const WebGLFramebuffer* mFB; michael@0: GLenum mAttachment; michael@0: }; michael@0: michael@0: Vector mAttachmentPoints; michael@0: michael@0: AttachmentPoint* Contains(const WebGLFramebuffer* fb, GLenum attachment); michael@0: michael@0: public: michael@0: michael@0: // Track FBO/Attachment combinations michael@0: void AttachTo(WebGLFramebuffer* fb, GLenum attachment); michael@0: void DetachFrom(WebGLFramebuffer* fb, GLenum attachment); michael@0: void NotifyFBsStatusChanged(); michael@0: }; michael@0: michael@0: } // namespace mozilla michael@0: michael@0: #endif // !WEBGLFRAMEBUFFERATTACHABLE_H_