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