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 WEBGL2CONTEXT_H_ michael@0: #define WEBGL2CONTEXT_H_ michael@0: michael@0: #include "WebGLContext.h" michael@0: michael@0: namespace mozilla { michael@0: michael@0: class WebGL2Context michael@0: : public WebGLContext michael@0: { michael@0: // ----------------------------------------------------------------------------- michael@0: // PUBLIC michael@0: public: michael@0: michael@0: // ------------------------------------------------------------------------- michael@0: // DESTRUCTOR michael@0: michael@0: virtual ~WebGL2Context(); michael@0: michael@0: michael@0: // ------------------------------------------------------------------------- michael@0: // STATIC FUNCTIONS michael@0: michael@0: static bool IsSupported(); michael@0: michael@0: static WebGL2Context* Create(); michael@0: michael@0: michael@0: // ------------------------------------------------------------------------- michael@0: // IMPLEMENT WebGLContext michael@0: michael@0: virtual bool IsWebGL2() const MOZ_OVERRIDE michael@0: { michael@0: return true; michael@0: } michael@0: michael@0: michael@0: // ------------------------------------------------------------------------- michael@0: // IMPLEMENT nsWrapperCache michael@0: michael@0: virtual JSObject* WrapObject(JSContext *cx) MOZ_OVERRIDE; michael@0: michael@0: michael@0: // ----------------------------------------------------------------------------- michael@0: // PRIVATE michael@0: private: michael@0: michael@0: // ------------------------------------------------------------------------- michael@0: // CONSTRUCTOR michael@0: michael@0: WebGL2Context(); michael@0: michael@0: michael@0: }; michael@0: michael@0: } // namespace mozilla michael@0: michael@0: #endif