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 WEBGLSHADERPRECISIONFORMAT_H_ michael@0: #define WEBGLSHADERPRECISIONFORMAT_H_ michael@0: michael@0: #include "WebGLObjectModel.h" michael@0: michael@0: namespace mozilla { michael@0: michael@0: class WebGLBuffer; michael@0: michael@0: class WebGLShaderPrecisionFormat MOZ_FINAL michael@0: : public WebGLContextBoundObject michael@0: { michael@0: public: michael@0: WebGLShaderPrecisionFormat(WebGLContext *context, GLint rangeMin, GLint rangeMax, GLint precision) : michael@0: WebGLContextBoundObject(context), michael@0: mRangeMin(rangeMin), michael@0: mRangeMax(rangeMax), michael@0: mPrecision(precision) michael@0: { michael@0: } michael@0: michael@0: JSObject* WrapObject(JSContext *cx); michael@0: michael@0: // WebIDL WebGLShaderPrecisionFormat API michael@0: GLint RangeMin() const { michael@0: return mRangeMin; michael@0: } michael@0: GLint RangeMax() const { michael@0: return mRangeMax; michael@0: } michael@0: GLint Precision() const { michael@0: return mPrecision; michael@0: } michael@0: michael@0: NS_INLINE_DECL_REFCOUNTING(WebGLShaderPrecisionFormat) michael@0: michael@0: private: michael@0: // Private destructor, to discourage deletion outside of Release(): michael@0: ~WebGLShaderPrecisionFormat() michael@0: { michael@0: } michael@0: michael@0: GLint mRangeMin; michael@0: GLint mRangeMax; michael@0: GLint mPrecision; michael@0: }; michael@0: michael@0: } // namespace mozilla michael@0: michael@0: #endif