2012-12-02 02:28:21 -08:00
|
|
|
/* -*- Mode: C++; tab-width: 4; 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/. */
|
|
|
|
|
|
|
|
#ifndef WEBGLSHADERPRECISIONFORMAT_H_
|
|
|
|
#define WEBGLSHADERPRECISIONFORMAT_H_
|
|
|
|
|
|
|
|
#include "WebGLObjectModel.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
|
|
|
|
class WebGLBuffer;
|
|
|
|
|
|
|
|
class WebGLShaderPrecisionFormat MOZ_FINAL
|
2013-08-29 08:39:17 -07:00
|
|
|
: public WebGLContextBoundObject
|
2012-12-02 02:28:21 -08:00
|
|
|
{
|
|
|
|
public:
|
2013-09-04 05:14:43 -07:00
|
|
|
WebGLShaderPrecisionFormat(WebGLContext *context, GLint rangeMin, GLint rangeMax, GLint precision) :
|
2012-12-02 02:28:21 -08:00
|
|
|
WebGLContextBoundObject(context),
|
|
|
|
mRangeMin(rangeMin),
|
|
|
|
mRangeMax(rangeMax),
|
|
|
|
mPrecision(precision)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-04-08 15:27:18 -07:00
|
|
|
JSObject* WrapObject(JSContext *cx);
|
2012-12-02 02:28:21 -08:00
|
|
|
|
|
|
|
// WebIDL WebGLShaderPrecisionFormat API
|
2013-09-04 05:14:43 -07:00
|
|
|
GLint RangeMin() const {
|
2012-12-02 02:28:21 -08:00
|
|
|
return mRangeMin;
|
|
|
|
}
|
2013-09-04 05:14:43 -07:00
|
|
|
GLint RangeMax() const {
|
2012-12-02 02:28:21 -08:00
|
|
|
return mRangeMax;
|
|
|
|
}
|
2013-09-04 05:14:43 -07:00
|
|
|
GLint Precision() const {
|
2012-12-02 02:28:21 -08:00
|
|
|
return mPrecision;
|
|
|
|
}
|
|
|
|
|
2013-08-29 08:39:17 -07:00
|
|
|
NS_INLINE_DECL_REFCOUNTING(WebGLShaderPrecisionFormat)
|
|
|
|
|
2014-04-04 09:27:02 -07:00
|
|
|
private:
|
|
|
|
// Private destructor, to discourage deletion outside of Release():
|
|
|
|
~WebGLShaderPrecisionFormat()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-09-04 05:14:43 -07:00
|
|
|
GLint mRangeMin;
|
|
|
|
GLint mRangeMax;
|
|
|
|
GLint mPrecision;
|
2012-12-02 02:28:21 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif
|