2011-10-01 08:45:50 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* 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/. */
|
2011-10-01 08:45:50 +04:00
|
|
|
|
2014-11-14 07:03:50 +03:00
|
|
|
#ifndef WEBGL_EXTENSIONS_H_
|
|
|
|
#define WEBGL_EXTENSIONS_H_
|
2011-10-01 08:45:50 +04:00
|
|
|
|
2015-07-15 03:37:28 +03:00
|
|
|
#include "mozilla/AlreadyAddRefed.h"
|
2016-11-23 05:59:35 +03:00
|
|
|
#include "nsString.h"
|
|
|
|
#include "nsTArray.h"
|
2014-03-08 01:25:27 +04:00
|
|
|
#include "nsWrapperCache.h"
|
|
|
|
#include "WebGLObjectModel.h"
|
|
|
|
#include "WebGLTypes.h"
|
|
|
|
|
2011-10-01 08:45:50 +04:00
|
|
|
namespace mozilla {
|
2017-01-31 05:58:52 +03:00
|
|
|
class ErrorResult;
|
2011-10-01 08:45:50 +04:00
|
|
|
|
2015-07-15 03:37:28 +03:00
|
|
|
namespace dom {
|
2016-11-23 05:59:35 +03:00
|
|
|
template<typename> struct Nullable;
|
|
|
|
template<typename> class Sequence;
|
2015-07-15 03:37:28 +03:00
|
|
|
} // namespace dom
|
|
|
|
|
2015-07-17 03:27:26 +03:00
|
|
|
namespace webgl {
|
|
|
|
class FormatUsageAuthority;
|
|
|
|
} // namespace webgl
|
|
|
|
|
2013-06-11 00:00:35 +04:00
|
|
|
class WebGLContext;
|
2014-03-08 01:25:27 +04:00
|
|
|
class WebGLShader;
|
2015-05-27 14:12:00 +03:00
|
|
|
class WebGLQuery;
|
2014-03-08 01:25:27 +04:00
|
|
|
class WebGLVertexArray;
|
2013-06-11 00:00:35 +04:00
|
|
|
|
2012-10-04 01:13:05 +04:00
|
|
|
class WebGLExtensionBase
|
2013-09-04 16:14:48 +04:00
|
|
|
: public nsWrapperCache
|
2012-10-04 01:13:05 +04:00
|
|
|
, public WebGLContextBoundObject
|
2011-10-27 00:00:44 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-11-14 07:03:50 +03:00
|
|
|
explicit WebGLExtensionBase(WebGLContext* webgl);
|
2012-10-04 01:13:05 +04:00
|
|
|
|
2014-11-14 07:03:50 +03:00
|
|
|
WebGLContext* GetParentObject() const {
|
2015-11-25 07:15:29 +03:00
|
|
|
return mContext;
|
2012-10-04 01:13:05 +04:00
|
|
|
}
|
2011-10-27 00:00:44 +04:00
|
|
|
|
2014-03-12 06:51:39 +04:00
|
|
|
void MarkLost();
|
|
|
|
|
2013-09-04 16:14:48 +04:00
|
|
|
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(WebGLExtensionBase)
|
|
|
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(WebGLExtensionBase)
|
2014-03-12 06:51:39 +04:00
|
|
|
|
|
|
|
protected:
|
2014-06-26 17:30:49 +04:00
|
|
|
virtual ~WebGLExtensionBase();
|
|
|
|
|
2016-05-24 19:52:00 +03:00
|
|
|
virtual void OnMarkLost() { }
|
|
|
|
|
2014-03-12 06:51:39 +04:00
|
|
|
bool mIsLost;
|
2011-10-27 00:00:44 +04:00
|
|
|
};
|
|
|
|
|
2014-11-14 07:03:50 +03:00
|
|
|
#define DECL_WEBGL_EXTENSION_GOOP \
|
2015-07-15 03:37:28 +03:00
|
|
|
virtual JSObject* WrapObject(JSContext* cx, JS::Handle<JSObject*> givenProto) override;
|
2012-10-04 01:13:05 +04:00
|
|
|
|
2015-06-01 17:17:00 +03:00
|
|
|
#define IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionType, WebGLBindingType)\
|
2014-11-14 07:03:50 +03:00
|
|
|
JSObject* \
|
2015-07-15 03:37:28 +03:00
|
|
|
WebGLExtensionType::WrapObject(JSContext* cx, JS::Handle<JSObject*> givenProto) { \
|
2018-06-26 00:20:54 +03:00
|
|
|
return dom::WebGLBindingType##_Binding::Wrap(cx, this, givenProto); \
|
2012-10-04 01:13:05 +04:00
|
|
|
}
|
|
|
|
|
2016-11-23 05:59:35 +03:00
|
|
|
////
|
|
|
|
|
|
|
|
class WebGLExtensionCompressedTextureASTC
|
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit WebGLExtensionCompressedTextureASTC(WebGLContext* webgl);
|
|
|
|
virtual ~WebGLExtensionCompressedTextureASTC();
|
|
|
|
|
|
|
|
void GetSupportedProfiles(dom::Nullable< nsTArray<nsString> >& retval) const;
|
|
|
|
|
|
|
|
static bool IsSupported(const WebGLContext* webgl);
|
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
2012-10-04 01:13:05 +04:00
|
|
|
class WebGLExtensionCompressedTextureATC
|
|
|
|
: public WebGLExtensionBase
|
2011-10-01 08:45:50 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-09-03 07:21:31 +04:00
|
|
|
explicit WebGLExtensionCompressedTextureATC(WebGLContext*);
|
2012-10-04 01:13:05 +04:00
|
|
|
virtual ~WebGLExtensionCompressedTextureATC();
|
2011-10-01 08:45:50 +04:00
|
|
|
|
2012-10-04 01:13:05 +04:00
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
2011-10-01 08:45:50 +04:00
|
|
|
};
|
|
|
|
|
2016-01-08 05:12:22 +03:00
|
|
|
class WebGLExtensionCompressedTextureES3
|
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit WebGLExtensionCompressedTextureES3(WebGLContext*);
|
|
|
|
virtual ~WebGLExtensionCompressedTextureES3();
|
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
2014-03-11 02:42:58 +04:00
|
|
|
class WebGLExtensionCompressedTextureETC1
|
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
2014-09-03 07:21:31 +04:00
|
|
|
explicit WebGLExtensionCompressedTextureETC1(WebGLContext*);
|
2014-03-11 02:42:58 +04:00
|
|
|
virtual ~WebGLExtensionCompressedTextureETC1();
|
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
2012-10-04 01:13:05 +04:00
|
|
|
class WebGLExtensionCompressedTexturePVRTC
|
|
|
|
: public WebGLExtensionBase
|
2012-02-23 17:43:57 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-09-03 07:21:31 +04:00
|
|
|
explicit WebGLExtensionCompressedTexturePVRTC(WebGLContext*);
|
2012-10-04 01:13:05 +04:00
|
|
|
virtual ~WebGLExtensionCompressedTexturePVRTC();
|
2012-02-23 17:43:57 +04:00
|
|
|
|
2012-10-04 01:13:05 +04:00
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
2012-02-23 17:43:57 +04:00
|
|
|
};
|
|
|
|
|
2012-10-04 01:13:05 +04:00
|
|
|
class WebGLExtensionCompressedTextureS3TC
|
|
|
|
: public WebGLExtensionBase
|
2012-05-08 21:29:31 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-09-03 07:21:31 +04:00
|
|
|
explicit WebGLExtensionCompressedTextureS3TC(WebGLContext*);
|
2012-05-08 21:29:31 +04:00
|
|
|
virtual ~WebGLExtensionCompressedTextureS3TC();
|
|
|
|
|
2017-05-30 18:21:33 +03:00
|
|
|
static bool IsSupported(const WebGLContext*);
|
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
|
|
|
class WebGLExtensionCompressedTextureS3TC_SRGB
|
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit WebGLExtensionCompressedTextureS3TC_SRGB(WebGLContext*);
|
|
|
|
virtual ~WebGLExtensionCompressedTextureS3TC_SRGB();
|
|
|
|
|
2017-08-09 02:32:23 +03:00
|
|
|
static bool IsSupported(const WebGLContext*);
|
|
|
|
|
2012-10-04 01:13:05 +04:00
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
2012-05-08 21:29:31 +04:00
|
|
|
};
|
|
|
|
|
2012-10-17 23:11:51 +04:00
|
|
|
class WebGLExtensionDebugRendererInfo
|
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
2014-09-03 07:21:31 +04:00
|
|
|
explicit WebGLExtensionDebugRendererInfo(WebGLContext*);
|
2012-10-17 23:11:51 +04:00
|
|
|
virtual ~WebGLExtensionDebugRendererInfo();
|
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
2014-02-12 02:37:06 +04:00
|
|
|
class WebGLExtensionDebugShaders
|
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
2014-09-03 07:21:31 +04:00
|
|
|
explicit WebGLExtensionDebugShaders(WebGLContext*);
|
2014-02-12 02:37:06 +04:00
|
|
|
virtual ~WebGLExtensionDebugShaders();
|
|
|
|
|
2016-11-02 00:58:07 +03:00
|
|
|
void GetTranslatedShaderSource(const WebGLShader& shader, nsAString& retval) const;
|
2014-02-12 02:37:06 +04:00
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
2012-10-04 01:13:05 +04:00
|
|
|
class WebGLExtensionDepthTexture
|
|
|
|
: public WebGLExtensionBase
|
2012-09-25 16:49:28 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-09-03 07:21:31 +04:00
|
|
|
explicit WebGLExtensionDepthTexture(WebGLContext*);
|
2012-10-04 01:13:05 +04:00
|
|
|
virtual ~WebGLExtensionDepthTexture();
|
2012-09-25 16:49:28 +04:00
|
|
|
|
2012-10-04 01:13:05 +04:00
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
2012-09-25 16:49:28 +04:00
|
|
|
};
|
|
|
|
|
2013-05-13 17:22:30 +04:00
|
|
|
class WebGLExtensionElementIndexUint
|
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
2014-09-03 07:21:31 +04:00
|
|
|
explicit WebGLExtensionElementIndexUint(WebGLContext*);
|
2013-05-13 17:22:30 +04:00
|
|
|
virtual ~WebGLExtensionElementIndexUint();
|
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
2016-05-05 02:39:02 +03:00
|
|
|
class WebGLExtensionEXTColorBufferFloat
|
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit WebGLExtensionEXTColorBufferFloat(WebGLContext*);
|
|
|
|
virtual ~WebGLExtensionEXTColorBufferFloat() { }
|
|
|
|
|
|
|
|
static bool IsSupported(const WebGLContext*);
|
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
2014-02-14 03:00:12 +04:00
|
|
|
class WebGLExtensionFragDepth
|
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
2014-09-03 07:21:31 +04:00
|
|
|
explicit WebGLExtensionFragDepth(WebGLContext*);
|
2014-02-14 03:00:12 +04:00
|
|
|
virtual ~WebGLExtensionFragDepth();
|
|
|
|
|
|
|
|
static bool IsSupported(const WebGLContext* context);
|
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
2012-10-04 01:13:05 +04:00
|
|
|
class WebGLExtensionLoseContext
|
|
|
|
: public WebGLExtensionBase
|
2012-09-25 16:49:28 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-09-03 07:21:31 +04:00
|
|
|
explicit WebGLExtensionLoseContext(WebGLContext*);
|
2012-10-04 01:13:05 +04:00
|
|
|
virtual ~WebGLExtensionLoseContext();
|
2012-09-25 16:49:28 +04:00
|
|
|
|
2012-10-04 01:13:05 +04:00
|
|
|
void LoseContext();
|
|
|
|
void RestoreContext();
|
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
2012-09-25 16:49:28 +04:00
|
|
|
};
|
|
|
|
|
2013-11-05 01:05:04 +04:00
|
|
|
class WebGLExtensionSRGB
|
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
2014-09-03 07:21:31 +04:00
|
|
|
explicit WebGLExtensionSRGB(WebGLContext*);
|
2013-11-05 01:05:04 +04:00
|
|
|
virtual ~WebGLExtensionSRGB();
|
|
|
|
|
|
|
|
static bool IsSupported(const WebGLContext* context);
|
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
2012-10-04 01:13:05 +04:00
|
|
|
class WebGLExtensionStandardDerivatives
|
|
|
|
: public WebGLExtensionBase
|
2012-08-14 05:17:55 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-09-03 07:21:31 +04:00
|
|
|
explicit WebGLExtensionStandardDerivatives(WebGLContext*);
|
2012-10-04 01:13:05 +04:00
|
|
|
virtual ~WebGLExtensionStandardDerivatives();
|
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
2014-07-24 19:58:43 +04:00
|
|
|
class WebGLExtensionShaderTextureLod
|
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
2014-09-03 07:21:31 +04:00
|
|
|
explicit WebGLExtensionShaderTextureLod(WebGLContext*);
|
2014-07-24 19:58:43 +04:00
|
|
|
virtual ~WebGLExtensionShaderTextureLod();
|
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
2012-10-04 01:13:05 +04:00
|
|
|
class WebGLExtensionTextureFilterAnisotropic
|
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
2014-09-03 07:21:31 +04:00
|
|
|
explicit WebGLExtensionTextureFilterAnisotropic(WebGLContext*);
|
2012-10-04 01:13:05 +04:00
|
|
|
virtual ~WebGLExtensionTextureFilterAnisotropic();
|
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
|
|
|
class WebGLExtensionTextureFloat
|
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
2015-07-17 03:27:26 +03:00
|
|
|
static void InitWebGLFormats(webgl::FormatUsageAuthority* authority);
|
|
|
|
|
2014-09-03 07:21:31 +04:00
|
|
|
explicit WebGLExtensionTextureFloat(WebGLContext*);
|
2012-10-04 01:13:05 +04:00
|
|
|
virtual ~WebGLExtensionTextureFloat();
|
2012-08-14 05:17:55 +04:00
|
|
|
|
2015-11-25 07:15:29 +03:00
|
|
|
static bool IsSupported(const WebGLContext*);
|
|
|
|
|
2012-10-04 01:13:05 +04:00
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
2012-08-14 05:17:55 +04:00
|
|
|
};
|
|
|
|
|
2013-06-11 00:00:52 +04:00
|
|
|
class WebGLExtensionTextureFloatLinear
|
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
2014-09-03 07:21:31 +04:00
|
|
|
explicit WebGLExtensionTextureFloatLinear(WebGLContext*);
|
2013-06-11 00:00:52 +04:00
|
|
|
virtual ~WebGLExtensionTextureFloatLinear();
|
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
2014-01-24 01:47:37 +04:00
|
|
|
class WebGLExtensionTextureHalfFloat
|
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
2015-07-17 03:27:26 +03:00
|
|
|
static void InitWebGLFormats(webgl::FormatUsageAuthority* authority);
|
|
|
|
|
2014-09-03 07:21:31 +04:00
|
|
|
explicit WebGLExtensionTextureHalfFloat(WebGLContext*);
|
2014-01-24 01:47:37 +04:00
|
|
|
virtual ~WebGLExtensionTextureHalfFloat();
|
|
|
|
|
2015-11-25 07:15:29 +03:00
|
|
|
static bool IsSupported(const WebGLContext*);
|
|
|
|
|
2014-01-24 01:47:37 +04:00
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
2014-02-13 18:53:53 +04:00
|
|
|
class WebGLExtensionTextureHalfFloatLinear
|
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
2014-09-03 07:21:31 +04:00
|
|
|
explicit WebGLExtensionTextureHalfFloatLinear(WebGLContext*);
|
2014-02-13 18:53:53 +04:00
|
|
|
virtual ~WebGLExtensionTextureHalfFloatLinear();
|
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
2014-03-08 01:26:17 +04:00
|
|
|
class WebGLExtensionColorBufferFloat
|
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
2014-09-03 07:21:31 +04:00
|
|
|
explicit WebGLExtensionColorBufferFloat(WebGLContext*);
|
2014-03-08 01:26:17 +04:00
|
|
|
virtual ~WebGLExtensionColorBufferFloat();
|
|
|
|
|
|
|
|
static bool IsSupported(const WebGLContext*);
|
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
|
|
|
class WebGLExtensionColorBufferHalfFloat
|
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
2014-09-03 07:21:31 +04:00
|
|
|
explicit WebGLExtensionColorBufferHalfFloat(WebGLContext*);
|
2014-03-08 01:26:17 +04:00
|
|
|
virtual ~WebGLExtensionColorBufferHalfFloat();
|
|
|
|
|
|
|
|
static bool IsSupported(const WebGLContext*);
|
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
2013-06-22 03:44:17 +04:00
|
|
|
class WebGLExtensionDrawBuffers
|
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
2014-09-03 07:21:31 +04:00
|
|
|
explicit WebGLExtensionDrawBuffers(WebGLContext*);
|
2013-06-22 03:44:17 +04:00
|
|
|
virtual ~WebGLExtensionDrawBuffers();
|
|
|
|
|
|
|
|
void DrawBuffersWEBGL(const dom::Sequence<GLenum>& buffers);
|
|
|
|
|
|
|
|
static bool IsSupported(const WebGLContext*);
|
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
2013-06-28 01:07:21 +04:00
|
|
|
class WebGLExtensionVertexArray
|
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
2014-11-14 07:03:50 +03:00
|
|
|
explicit WebGLExtensionVertexArray(WebGLContext* webgl);
|
2013-06-28 01:07:21 +04:00
|
|
|
virtual ~WebGLExtensionVertexArray();
|
|
|
|
|
|
|
|
already_AddRefed<WebGLVertexArray> CreateVertexArrayOES();
|
|
|
|
void DeleteVertexArrayOES(WebGLVertexArray* array);
|
2016-11-30 05:30:28 +03:00
|
|
|
bool IsVertexArrayOES(const WebGLVertexArray* array);
|
2013-06-28 01:07:21 +04:00
|
|
|
void BindVertexArrayOES(WebGLVertexArray* array);
|
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
2013-08-14 02:11:01 +04:00
|
|
|
class WebGLExtensionInstancedArrays
|
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
2014-11-14 07:03:50 +03:00
|
|
|
explicit WebGLExtensionInstancedArrays(WebGLContext* webgl);
|
2013-08-14 02:11:01 +04:00
|
|
|
virtual ~WebGLExtensionInstancedArrays();
|
|
|
|
|
2014-11-14 07:03:50 +03:00
|
|
|
void DrawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count,
|
|
|
|
GLsizei primcount);
|
|
|
|
void DrawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type,
|
|
|
|
WebGLintptr offset, GLsizei primcount);
|
2013-09-04 16:14:43 +04:00
|
|
|
void VertexAttribDivisorANGLE(GLuint index, GLuint divisor);
|
2013-08-14 02:11:01 +04:00
|
|
|
|
2014-11-14 07:03:50 +03:00
|
|
|
static bool IsSupported(const WebGLContext* webgl);
|
2013-08-14 02:11:01 +04:00
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
2014-06-14 20:07:53 +04:00
|
|
|
class WebGLExtensionBlendMinMax
|
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
2014-11-14 07:03:50 +03:00
|
|
|
explicit WebGLExtensionBlendMinMax(WebGLContext* webgl);
|
2014-06-14 20:07:53 +04:00
|
|
|
virtual ~WebGLExtensionBlendMinMax();
|
|
|
|
|
|
|
|
static bool IsSupported(const WebGLContext*);
|
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
2015-05-27 14:12:00 +03:00
|
|
|
class WebGLExtensionDisjointTimerQuery
|
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit WebGLExtensionDisjointTimerQuery(WebGLContext* webgl);
|
|
|
|
virtual ~WebGLExtensionDisjointTimerQuery();
|
|
|
|
|
2016-10-04 04:33:52 +03:00
|
|
|
already_AddRefed<WebGLQuery> CreateQueryEXT() const;
|
|
|
|
void DeleteQueryEXT(WebGLQuery* query) const;
|
|
|
|
bool IsQueryEXT(const WebGLQuery* query) const;
|
2016-11-02 00:58:07 +03:00
|
|
|
void BeginQueryEXT(GLenum target, WebGLQuery& query) const;
|
2016-10-04 04:33:52 +03:00
|
|
|
void EndQueryEXT(GLenum target) const;
|
2016-11-02 00:58:07 +03:00
|
|
|
void QueryCounterEXT(WebGLQuery& query, GLenum target) const;
|
2016-10-04 04:33:52 +03:00
|
|
|
void GetQueryEXT(JSContext* cx, GLenum target, GLenum pname,
|
|
|
|
JS::MutableHandleValue retval) const;
|
2016-11-02 00:58:07 +03:00
|
|
|
void GetQueryObjectEXT(JSContext* cx, const WebGLQuery& query,
|
2016-10-04 04:33:52 +03:00
|
|
|
GLenum pname, JS::MutableHandleValue retval) const;
|
2015-05-27 14:12:00 +03:00
|
|
|
|
|
|
|
static bool IsSupported(const WebGLContext*);
|
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
2017-04-11 11:50:59 +03:00
|
|
|
class WebGLExtensionMOZDebug final
|
2017-01-31 05:58:52 +03:00
|
|
|
: public WebGLExtensionBase
|
|
|
|
{
|
|
|
|
public:
|
2017-04-11 11:50:59 +03:00
|
|
|
explicit WebGLExtensionMOZDebug(WebGLContext* webgl);
|
|
|
|
virtual ~WebGLExtensionMOZDebug();
|
2017-01-31 05:58:52 +03:00
|
|
|
|
|
|
|
void GetParameter(JSContext* cx, GLenum pname,
|
|
|
|
JS::MutableHandle<JS::Value> retval, ErrorResult& er) const;
|
|
|
|
|
|
|
|
DECL_WEBGL_EXTENSION_GOOP
|
|
|
|
};
|
|
|
|
|
2012-10-04 01:13:05 +04:00
|
|
|
} // namespace mozilla
|
2011-10-01 08:45:50 +04:00
|
|
|
|
2014-11-14 07:03:50 +03:00
|
|
|
#endif // WEBGL_EXTENSIONS_H_
|