Copy as Markdown

Other Tools

/* THIS FILE IS AUTOGENERATED FROM WebGL2RenderingContext.webidl BY Codegen.py - DO NOT EDIT */
#ifndef DOM_WEBGL2RENDERINGCONTEXTBINDING_H_
#define DOM_WEBGL2RENDERINGCONTEXTBINDING_H_
#include "WebGLRenderingContextBinding.h"
#include "js/CallAndConstruct.h"
#include "js/RootingAPI.h"
#include "js/TypeDecls.h"
#include "js/Value.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/FakeString.h"
#include "mozilla/dom/Nullable.h"
#include "mozilla/dom/PrototypeList.h"
#include "mozilla/dom/TypedArray.h"
#include "mozilla/dom/UnionMember.h"
namespace mozilla {
class ClientWebGLContext;
class ClientWebGLExtensionEXTColorBufferFloat;
class ClientWebGLExtensionMultiview;
class WebGLSamplerJS;
class WebGLSyncJS;
class WebGLTransformFeedbackJS;
namespace dom {
struct NativePropertyHooks;
class ProtoAndIfaceCache;
} // namespace dom
} // namespace mozilla
namespace mozilla::dom {
class MaybeSharedUint32ArrayOrUnsignedLongSequence : public AllUnionBase,
public UnionWithTypedArraysBase
{
public:
using ApplyToTypedArrays = binding_detail::ApplyToTypedArraysHelper<MaybeSharedUint32ArrayOrUnsignedLongSequence, true, Uint32Array>;
private:
enum TypeOrUninit
{
eUninitialized,
eUint32Array,
eUnsignedLongSequence
};
public:
enum class Type
{
eUint32Array = TypeOrUninit::eUint32Array,
eUnsignedLongSequence = TypeOrUninit::eUnsignedLongSequence
};
private:
union Value
{
UnionMember<RootedSpiderMonkeyInterface<Uint32Array> > mUint32Array;
UnionMember<binding_detail::AutoSequence<uint32_t> > mUnsignedLongSequence;
};
TypeOrUninit mType;
Value mValue;
MaybeSharedUint32ArrayOrUnsignedLongSequence(const MaybeSharedUint32ArrayOrUnsignedLongSequence&) = delete;
MaybeSharedUint32ArrayOrUnsignedLongSequence& operator=(const MaybeSharedUint32ArrayOrUnsignedLongSequence&) = delete;
public:
explicit inline MaybeSharedUint32ArrayOrUnsignedLongSequence()
: mType(eUninitialized)
{
}
inline ~MaybeSharedUint32ArrayOrUnsignedLongSequence()
{
Uninit();
}
[[nodiscard]] inline RootedSpiderMonkeyInterface<Uint32Array>&
RawSetAsUint32Array(JSContext* cx)
{
if (mType == eUint32Array) {
return mValue.mUint32Array.Value();
}
MOZ_ASSERT(mType == eUninitialized);
mType = eUint32Array;
return mValue.mUint32Array.SetValue(cx);
}
[[nodiscard]] inline RootedSpiderMonkeyInterface<Uint32Array>&
SetAsUint32Array(JSContext* cx)
{
if (mType == eUint32Array) {
return mValue.mUint32Array.Value();
}
Uninit();
mType = eUint32Array;
return mValue.mUint32Array.SetValue(cx);
}
inline bool
IsUint32Array() const
{
return mType == eUint32Array;
}
inline RootedSpiderMonkeyInterface<Uint32Array>&
GetAsUint32Array()
{
MOZ_RELEASE_ASSERT(IsUint32Array(), "Wrong type!");
return mValue.mUint32Array.Value();
}
inline Uint32Array const &
GetAsUint32Array() const
{
MOZ_RELEASE_ASSERT(IsUint32Array(), "Wrong type!");
return mValue.mUint32Array.Value();
}
[[nodiscard]] inline binding_detail::AutoSequence<uint32_t>&
RawSetAsUnsignedLongSequence()
{
if (mType == eUnsignedLongSequence) {
return mValue.mUnsignedLongSequence.Value();
}
MOZ_ASSERT(mType == eUninitialized);
mType = eUnsignedLongSequence;
return mValue.mUnsignedLongSequence.SetValue();
}
[[nodiscard]] inline binding_detail::AutoSequence<uint32_t>&
SetAsUnsignedLongSequence()
{
if (mType == eUnsignedLongSequence) {
return mValue.mUnsignedLongSequence.Value();
}
Uninit();
mType = eUnsignedLongSequence;
return mValue.mUnsignedLongSequence.SetValue();
}
inline bool
IsUnsignedLongSequence() const
{
return mType == eUnsignedLongSequence;
}
inline binding_detail::AutoSequence<uint32_t>&
GetAsUnsignedLongSequence()
{
MOZ_RELEASE_ASSERT(IsUnsignedLongSequence(), "Wrong type!");
return mValue.mUnsignedLongSequence.Value();
}
inline const Sequence<uint32_t>&
GetAsUnsignedLongSequence() const
{
MOZ_RELEASE_ASSERT(IsUnsignedLongSequence(), "Wrong type!");
return mValue.mUnsignedLongSequence.Value();
}
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> value, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> value, const char* sourceDescription = "Value", bool passedToJSImpl = false);
inline void
Uninit()
{
switch (mType) {
case eUninitialized: {
break;
}
case eUint32Array: {
DestroyUint32Array();
break;
}
case eUnsignedLongSequence: {
DestroyUnsignedLongSequence();
break;
}
}
}
bool
ToJSVal(JSContext* cx, JS::Handle<JSObject*> scopeObj, JS::MutableHandle<JS::Value> rval) const;
private:
bool
TrySetToUint32Array(BindingCallContext& cx, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
bool
TrySetToUint32Array(JSContext* cx_, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
inline void
DestroyUint32Array()
{
MOZ_RELEASE_ASSERT(IsUint32Array(), "Wrong type!");
mValue.mUint32Array.Destroy();
mType = eUninitialized;
}
bool
TrySetToUnsignedLongSequence(BindingCallContext& cx, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
bool
TrySetToUnsignedLongSequence(JSContext* cx_, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
inline void
DestroyUnsignedLongSequence()
{
MOZ_RELEASE_ASSERT(IsUnsignedLongSequence(), "Wrong type!");
mValue.mUnsignedLongSequence.Destroy();
mType = eUninitialized;
}
};
class OwningMaybeSharedUint32ArrayOrUnsignedLongSequence : public AllOwningUnionBase,
public UnionWithTypedArraysBase
{
public:
using ApplyToTypedArrays = binding_detail::ApplyToTypedArraysHelper<OwningMaybeSharedUint32ArrayOrUnsignedLongSequence, true, Uint32Array>;
private:
enum TypeOrUninit
{
eUninitialized,
eUint32Array,
eUnsignedLongSequence
};
public:
enum class Type
{
eUint32Array = TypeOrUninit::eUint32Array,
eUnsignedLongSequence = TypeOrUninit::eUnsignedLongSequence
};
private:
union Value
{
UnionMember<Uint32Array > mUint32Array;
UnionMember<Sequence<uint32_t> > mUnsignedLongSequence;
};
TypeOrUninit mType;
Value mValue;
OwningMaybeSharedUint32ArrayOrUnsignedLongSequence(const OwningMaybeSharedUint32ArrayOrUnsignedLongSequence&) = delete;
OwningMaybeSharedUint32ArrayOrUnsignedLongSequence& operator=(const OwningMaybeSharedUint32ArrayOrUnsignedLongSequence&) = delete;
public:
explicit inline OwningMaybeSharedUint32ArrayOrUnsignedLongSequence()
: mType(eUninitialized)
{
}
OwningMaybeSharedUint32ArrayOrUnsignedLongSequence(OwningMaybeSharedUint32ArrayOrUnsignedLongSequence&& aOther);
inline ~OwningMaybeSharedUint32ArrayOrUnsignedLongSequence()
{
Uninit();
}
[[nodiscard]] Uint32Array&
RawSetAsUint32Array();
[[nodiscard]] Uint32Array&
SetAsUint32Array();
inline bool
IsUint32Array() const
{
return mType == eUint32Array;
}
inline Uint32Array&
GetAsUint32Array()
{
MOZ_RELEASE_ASSERT(IsUint32Array(), "Wrong type!");
return mValue.mUint32Array.Value();
}
inline Uint32Array const &
GetAsUint32Array() const
{
MOZ_RELEASE_ASSERT(IsUint32Array(), "Wrong type!");
return mValue.mUint32Array.Value();
}
[[nodiscard]] Sequence<uint32_t>&
RawSetAsUnsignedLongSequence();
[[nodiscard]] Sequence<uint32_t>&
SetAsUnsignedLongSequence();
inline bool
IsUnsignedLongSequence() const
{
return mType == eUnsignedLongSequence;
}
inline Sequence<uint32_t>&
GetAsUnsignedLongSequence()
{
MOZ_RELEASE_ASSERT(IsUnsignedLongSequence(), "Wrong type!");
return mValue.mUnsignedLongSequence.Value();
}
inline Sequence<uint32_t> const &
GetAsUnsignedLongSequence() const
{
MOZ_RELEASE_ASSERT(IsUnsignedLongSequence(), "Wrong type!");
return mValue.mUnsignedLongSequence.Value();
}
bool
Init(BindingCallContext& cx, JS::Handle<JS::Value> value, const char* sourceDescription = "Value", bool passedToJSImpl = false);
bool
Init(JSContext* cx_, JS::Handle<JS::Value> value, const char* sourceDescription = "Value", bool passedToJSImpl = false);
void
Uninit();
bool
ToJSVal(JSContext* cx, JS::Handle<JSObject*> scopeObj, JS::MutableHandle<JS::Value> rval) const;
void
TraceUnion(JSTracer* trc);
OwningMaybeSharedUint32ArrayOrUnsignedLongSequence&
operator=(OwningMaybeSharedUint32ArrayOrUnsignedLongSequence&& aOther);
inline Type
GetType() const
{
MOZ_RELEASE_ASSERT(mType != eUninitialized);
return static_cast<Type>(mType);
}
private:
bool
TrySetToUint32Array(BindingCallContext& cx, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
bool
TrySetToUint32Array(JSContext* cx_, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
void
DestroyUint32Array();
bool
TrySetToUnsignedLongSequence(BindingCallContext& cx, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
bool
TrySetToUnsignedLongSequence(JSContext* cx_, JS::Handle<JS::Value> value, bool& tryNext, bool passedToJSImpl = false);
void
DestroyUnsignedLongSequence();
};
namespace EXT_color_buffer_float_Binding {
typedef mozilla::ClientWebGLExtensionEXTColorBufferFloat NativeType;
bool
Wrap(JSContext* aCx, mozilla::ClientWebGLExtensionEXTColorBufferFloat* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
template <class T>
inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
{
JS::Rooted<JSObject*> reflector(aCx);
return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
}
void
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, DefineInterfaceProperty aDefineOnGlobal);
} // namespace EXT_color_buffer_float_Binding
namespace OVR_multiview2_Binding {
typedef mozilla::ClientWebGLExtensionMultiview NativeType;
static const uint32_t FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR = 38448;
static const uint32_t FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR = 38450;
static const uint32_t MAX_VIEWS_OVR = 38449;
static const uint32_t FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR = 38451;
bool
Wrap(JSContext* aCx, mozilla::ClientWebGLExtensionMultiview* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
template <class T>
inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
{
JS::Rooted<JSObject*> reflector(aCx);
return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
}
void
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, DefineInterfaceProperty aDefineOnGlobal);
} // namespace OVR_multiview2_Binding
namespace WebGL2RenderingContext_Binding {
typedef mozilla::ClientWebGLContext NativeType;
static const uint32_t READ_BUFFER = 3074;
static const uint32_t UNPACK_ROW_LENGTH = 3314;
static const uint32_t UNPACK_SKIP_ROWS = 3315;
static const uint32_t UNPACK_SKIP_PIXELS = 3316;
static const uint32_t PACK_ROW_LENGTH = 3330;
static const uint32_t PACK_SKIP_ROWS = 3331;
static const uint32_t PACK_SKIP_PIXELS = 3332;
static const uint32_t COLOR = 6144;
static const uint32_t DEPTH = 6145;
static const uint32_t STENCIL = 6146;
static const uint32_t RED = 6403;
static const uint32_t RGB8 = 32849;
static const uint32_t RGBA8 = 32856;
static const uint32_t RGB10_A2 = 32857;
static const uint32_t TEXTURE_BINDING_3D = 32874;
static const uint32_t UNPACK_SKIP_IMAGES = 32877;
static const uint32_t UNPACK_IMAGE_HEIGHT = 32878;
static const uint32_t TEXTURE_3D = 32879;
static const uint32_t TEXTURE_WRAP_R = 32882;
static const uint32_t MAX_3D_TEXTURE_SIZE = 32883;
static const uint32_t UNSIGNED_INT_2_10_10_10_REV = 33640;
static const uint32_t MAX_ELEMENTS_VERTICES = 33000;
static const uint32_t MAX_ELEMENTS_INDICES = 33001;
static const uint32_t TEXTURE_MIN_LOD = 33082;
static const uint32_t TEXTURE_MAX_LOD = 33083;
static const uint32_t TEXTURE_BASE_LEVEL = 33084;
static const uint32_t TEXTURE_MAX_LEVEL = 33085;
static const uint32_t MIN = 32775;
static const uint32_t MAX = 32776;
static const uint32_t DEPTH_COMPONENT24 = 33190;
static const uint32_t MAX_TEXTURE_LOD_BIAS = 34045;
static const uint32_t TEXTURE_COMPARE_MODE = 34892;
static const uint32_t TEXTURE_COMPARE_FUNC = 34893;
static const uint32_t CURRENT_QUERY = 34917;
static const uint32_t QUERY_RESULT = 34918;
static const uint32_t QUERY_RESULT_AVAILABLE = 34919;
static const uint32_t STREAM_READ = 35041;
static const uint32_t STREAM_COPY = 35042;
static const uint32_t STATIC_READ = 35045;
static const uint32_t STATIC_COPY = 35046;
static const uint32_t DYNAMIC_READ = 35049;
static const uint32_t DYNAMIC_COPY = 35050;
static const uint32_t MAX_DRAW_BUFFERS = 34852;
static const uint32_t DRAW_BUFFER0 = 34853;
static const uint32_t DRAW_BUFFER1 = 34854;
static const uint32_t DRAW_BUFFER2 = 34855;
static const uint32_t DRAW_BUFFER3 = 34856;
static const uint32_t DRAW_BUFFER4 = 34857;
static const uint32_t DRAW_BUFFER5 = 34858;
static const uint32_t DRAW_BUFFER6 = 34859;
static const uint32_t DRAW_BUFFER7 = 34860;
static const uint32_t DRAW_BUFFER8 = 34861;
static const uint32_t DRAW_BUFFER9 = 34862;
static const uint32_t DRAW_BUFFER10 = 34863;
static const uint32_t DRAW_BUFFER11 = 34864;
static const uint32_t DRAW_BUFFER12 = 34865;
static const uint32_t DRAW_BUFFER13 = 34866;
static const uint32_t DRAW_BUFFER14 = 34867;
static const uint32_t DRAW_BUFFER15 = 34868;
static const uint32_t MAX_FRAGMENT_UNIFORM_COMPONENTS = 35657;
static const uint32_t MAX_VERTEX_UNIFORM_COMPONENTS = 35658;
static const uint32_t SAMPLER_3D = 35679;
static const uint32_t SAMPLER_2D_SHADOW = 35682;
static const uint32_t FRAGMENT_SHADER_DERIVATIVE_HINT = 35723;
static const uint32_t PIXEL_PACK_BUFFER = 35051;
static const uint32_t PIXEL_UNPACK_BUFFER = 35052;
static const uint32_t PIXEL_PACK_BUFFER_BINDING = 35053;
static const uint32_t PIXEL_UNPACK_BUFFER_BINDING = 35055;
static const uint32_t FLOAT_MAT2x3 = 35685;
static const uint32_t FLOAT_MAT2x4 = 35686;
static const uint32_t FLOAT_MAT3x2 = 35687;
static const uint32_t FLOAT_MAT3x4 = 35688;
static const uint32_t FLOAT_MAT4x2 = 35689;
static const uint32_t FLOAT_MAT4x3 = 35690;
static const uint32_t SRGB = 35904;
static const uint32_t SRGB8 = 35905;
static const uint32_t SRGB8_ALPHA8 = 35907;
static const uint32_t COMPARE_REF_TO_TEXTURE = 34894;
static const uint32_t RGBA32F = 34836;
static const uint32_t RGB32F = 34837;
static const uint32_t RGBA16F = 34842;
static const uint32_t RGB16F = 34843;
static const uint32_t VERTEX_ATTRIB_ARRAY_INTEGER = 35069;
static const uint32_t MAX_ARRAY_TEXTURE_LAYERS = 35071;
static const uint32_t MIN_PROGRAM_TEXEL_OFFSET = 35076;
static const uint32_t MAX_PROGRAM_TEXEL_OFFSET = 35077;
static const uint32_t MAX_VARYING_COMPONENTS = 35659;
static const uint32_t TEXTURE_2D_ARRAY = 35866;
static const uint32_t TEXTURE_BINDING_2D_ARRAY = 35869;
static const uint32_t R11F_G11F_B10F = 35898;
static const uint32_t UNSIGNED_INT_10F_11F_11F_REV = 35899;
static const uint32_t RGB9_E5 = 35901;
static const uint32_t UNSIGNED_INT_5_9_9_9_REV = 35902;
static const uint32_t TRANSFORM_FEEDBACK_BUFFER_MODE = 35967;
static const uint32_t MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 35968;
static const uint32_t TRANSFORM_FEEDBACK_VARYINGS = 35971;
static const uint32_t TRANSFORM_FEEDBACK_BUFFER_START = 35972;
static const uint32_t TRANSFORM_FEEDBACK_BUFFER_SIZE = 35973;
static const uint32_t TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 35976;
static const uint32_t RASTERIZER_DISCARD = 35977;
static const uint32_t MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 35978;
static const uint32_t MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 35979;
static const uint32_t INTERLEAVED_ATTRIBS = 35980;
static const uint32_t SEPARATE_ATTRIBS = 35981;
static const uint32_t TRANSFORM_FEEDBACK_BUFFER = 35982;
static const uint32_t TRANSFORM_FEEDBACK_BUFFER_BINDING = 35983;
static const uint32_t RGBA32UI = 36208;
static const uint32_t RGB32UI = 36209;
static const uint32_t RGBA16UI = 36214;
static const uint32_t RGB16UI = 36215;
static const uint32_t RGBA8UI = 36220;
static const uint32_t RGB8UI = 36221;
static const uint32_t RGBA32I = 36226;
static const uint32_t RGB32I = 36227;
static const uint32_t RGBA16I = 36232;
static const uint32_t RGB16I = 36233;
static const uint32_t RGBA8I = 36238;
static const uint32_t RGB8I = 36239;
static const uint32_t RED_INTEGER = 36244;
static const uint32_t RGB_INTEGER = 36248;
static const uint32_t RGBA_INTEGER = 36249;
static const uint32_t SAMPLER_2D_ARRAY = 36289;
static const uint32_t SAMPLER_2D_ARRAY_SHADOW = 36292;
static const uint32_t SAMPLER_CUBE_SHADOW = 36293;
static const uint32_t UNSIGNED_INT_VEC2 = 36294;
static const uint32_t UNSIGNED_INT_VEC3 = 36295;
static const uint32_t UNSIGNED_INT_VEC4 = 36296;
static const uint32_t INT_SAMPLER_2D = 36298;
static const uint32_t INT_SAMPLER_3D = 36299;
static const uint32_t INT_SAMPLER_CUBE = 36300;
static const uint32_t INT_SAMPLER_2D_ARRAY = 36303;
static const uint32_t UNSIGNED_INT_SAMPLER_2D = 36306;
static const uint32_t UNSIGNED_INT_SAMPLER_3D = 36307;
static const uint32_t UNSIGNED_INT_SAMPLER_CUBE = 36308;
static const uint32_t UNSIGNED_INT_SAMPLER_2D_ARRAY = 36311;
static const uint32_t DEPTH_COMPONENT32F = 36012;
static const uint32_t DEPTH32F_STENCIL8 = 36013;
static const uint32_t FLOAT_32_UNSIGNED_INT_24_8_REV = 36269;
static const uint32_t FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 33296;
static const uint32_t FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 33297;
static const uint32_t FRAMEBUFFER_ATTACHMENT_RED_SIZE = 33298;
static const uint32_t FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 33299;
static const uint32_t FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 33300;
static const uint32_t FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 33301;
static const uint32_t FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 33302;
static const uint32_t FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 33303;
static const uint32_t FRAMEBUFFER_DEFAULT = 33304;
static const uint32_t UNSIGNED_INT_24_8 = 34042;
static const uint32_t DEPTH24_STENCIL8 = 35056;
static const uint32_t UNSIGNED_NORMALIZED = 35863;
static const uint32_t DRAW_FRAMEBUFFER_BINDING = 36006;
static const uint32_t READ_FRAMEBUFFER = 36008;
static const uint32_t DRAW_FRAMEBUFFER = 36009;
static const uint32_t READ_FRAMEBUFFER_BINDING = 36010;
static const uint32_t RENDERBUFFER_SAMPLES = 36011;
static const uint32_t FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 36052;
static const uint32_t MAX_COLOR_ATTACHMENTS = 36063;
static const uint32_t COLOR_ATTACHMENT1 = 36065;
static const uint32_t COLOR_ATTACHMENT2 = 36066;
static const uint32_t COLOR_ATTACHMENT3 = 36067;
static const uint32_t COLOR_ATTACHMENT4 = 36068;
static const uint32_t COLOR_ATTACHMENT5 = 36069;
static const uint32_t COLOR_ATTACHMENT6 = 36070;
static const uint32_t COLOR_ATTACHMENT7 = 36071;
static const uint32_t COLOR_ATTACHMENT8 = 36072;
static const uint32_t COLOR_ATTACHMENT9 = 36073;
static const uint32_t COLOR_ATTACHMENT10 = 36074;
static const uint32_t COLOR_ATTACHMENT11 = 36075;
static const uint32_t COLOR_ATTACHMENT12 = 36076;
static const uint32_t COLOR_ATTACHMENT13 = 36077;
static const uint32_t COLOR_ATTACHMENT14 = 36078;
static const uint32_t COLOR_ATTACHMENT15 = 36079;
static const uint32_t FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 36182;
static const uint32_t MAX_SAMPLES = 36183;
static const uint32_t HALF_FLOAT = 5131;
static const uint32_t RG = 33319;
static const uint32_t RG_INTEGER = 33320;
static const uint32_t R8 = 33321;
static const uint32_t RG8 = 33323;
static const uint32_t R16F = 33325;
static const uint32_t R32F = 33326;
static const uint32_t RG16F = 33327;
static const uint32_t RG32F = 33328;
static const uint32_t R8I = 33329;
static const uint32_t R8UI = 33330;
static const uint32_t R16I = 33331;
static const uint32_t R16UI = 33332;
static const uint32_t R32I = 33333;
static const uint32_t R32UI = 33334;
static const uint32_t RG8I = 33335;
static const uint32_t RG8UI = 33336;
static const uint32_t RG16I = 33337;
static const uint32_t RG16UI = 33338;
static const uint32_t RG32I = 33339;
static const uint32_t RG32UI = 33340;
static const uint32_t VERTEX_ARRAY_BINDING = 34229;
static const uint32_t R8_SNORM = 36756;
static const uint32_t RG8_SNORM = 36757;
static const uint32_t RGB8_SNORM = 36758;
static const uint32_t RGBA8_SNORM = 36759;
static const uint32_t SIGNED_NORMALIZED = 36764;
static const uint32_t COPY_READ_BUFFER = 36662;
static const uint32_t COPY_WRITE_BUFFER = 36663;
static const uint32_t COPY_READ_BUFFER_BINDING = 36662;
static const uint32_t COPY_WRITE_BUFFER_BINDING = 36663;
static const uint32_t UNIFORM_BUFFER = 35345;
static const uint32_t UNIFORM_BUFFER_BINDING = 35368;
static const uint32_t UNIFORM_BUFFER_START = 35369;
static const uint32_t UNIFORM_BUFFER_SIZE = 35370;
static const uint32_t MAX_VERTEX_UNIFORM_BLOCKS = 35371;
static const uint32_t MAX_FRAGMENT_UNIFORM_BLOCKS = 35373;
static const uint32_t MAX_COMBINED_UNIFORM_BLOCKS = 35374;
static const uint32_t MAX_UNIFORM_BUFFER_BINDINGS = 35375;
static const uint32_t MAX_UNIFORM_BLOCK_SIZE = 35376;
static const uint32_t MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 35377;
static const uint32_t MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 35379;
static const uint32_t UNIFORM_BUFFER_OFFSET_ALIGNMENT = 35380;
static const uint32_t ACTIVE_UNIFORM_BLOCKS = 35382;
static const uint32_t UNIFORM_TYPE = 35383;
static const uint32_t UNIFORM_SIZE = 35384;
static const uint32_t UNIFORM_BLOCK_INDEX = 35386;
static const uint32_t UNIFORM_OFFSET = 35387;
static const uint32_t UNIFORM_ARRAY_STRIDE = 35388;
static const uint32_t UNIFORM_MATRIX_STRIDE = 35389;
static const uint32_t UNIFORM_IS_ROW_MAJOR = 35390;
static const uint32_t UNIFORM_BLOCK_BINDING = 35391;
static const uint32_t UNIFORM_BLOCK_DATA_SIZE = 35392;
static const uint32_t UNIFORM_BLOCK_ACTIVE_UNIFORMS = 35394;
static const uint32_t UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 35395;
static const uint32_t UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 35396;
static const uint32_t UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 35398;
static const uint32_t INVALID_INDEX = 4294967295;
static const uint32_t MAX_VERTEX_OUTPUT_COMPONENTS = 37154;
static const uint32_t MAX_FRAGMENT_INPUT_COMPONENTS = 37157;
static const uint32_t MAX_SERVER_WAIT_TIMEOUT = 37137;
static const uint32_t OBJECT_TYPE = 37138;
static const uint32_t SYNC_CONDITION = 37139;
static const uint32_t SYNC_STATUS = 37140;
static const uint32_t SYNC_FLAGS = 37141;
static const uint32_t SYNC_FENCE = 37142;
static const uint32_t SYNC_GPU_COMMANDS_COMPLETE = 37143;
static const uint32_t UNSIGNALED = 37144;
static const uint32_t SIGNALED = 37145;
static const uint32_t ALREADY_SIGNALED = 37146;
static const uint32_t TIMEOUT_EXPIRED = 37147;
static const uint32_t CONDITION_SATISFIED = 37148;
static const uint32_t WAIT_FAILED = 37149;
static const uint32_t SYNC_FLUSH_COMMANDS_BIT = 1;
static const uint32_t VERTEX_ATTRIB_ARRAY_DIVISOR = 35070;
static const uint32_t ANY_SAMPLES_PASSED = 35887;
static const uint32_t ANY_SAMPLES_PASSED_CONSERVATIVE = 36202;
static const uint32_t SAMPLER_BINDING = 35097;
static const uint32_t RGB10_A2UI = 36975;
static const uint32_t INT_2_10_10_10_REV = 36255;
static const uint32_t TRANSFORM_FEEDBACK = 36386;
static const uint32_t TRANSFORM_FEEDBACK_PAUSED = 36387;
static const uint32_t TRANSFORM_FEEDBACK_ACTIVE = 36388;
static const uint32_t TRANSFORM_FEEDBACK_BINDING = 36389;
static const uint32_t TEXTURE_IMMUTABLE_FORMAT = 37167;
static const uint32_t MAX_ELEMENT_INDEX = 36203;
static const uint32_t TEXTURE_IMMUTABLE_LEVELS = 33503;
static const int64_t TIMEOUT_IGNORED = -1;
static const uint32_t MAX_CLIENT_WAIT_TIMEOUT_WEBGL = 37447;
static const uint32_t DEPTH_BUFFER_BIT = 256;
static const uint32_t STENCIL_BUFFER_BIT = 1024;
static const uint32_t COLOR_BUFFER_BIT = 16384;
static const uint32_t POINTS = 0;
static const uint32_t LINES = 1;
static const uint32_t LINE_LOOP = 2;
static const uint32_t LINE_STRIP = 3;
static const uint32_t TRIANGLES = 4;
static const uint32_t TRIANGLE_STRIP = 5;
static const uint32_t TRIANGLE_FAN = 6;
static const uint32_t ZERO = 0;
static const uint32_t ONE = 1;
static const uint32_t SRC_COLOR = 768;
static const uint32_t ONE_MINUS_SRC_COLOR = 769;
static const uint32_t SRC_ALPHA = 770;
static const uint32_t ONE_MINUS_SRC_ALPHA = 771;
static const uint32_t DST_ALPHA = 772;
static const uint32_t ONE_MINUS_DST_ALPHA = 773;
static const uint32_t DST_COLOR = 774;
static const uint32_t ONE_MINUS_DST_COLOR = 775;
static const uint32_t SRC_ALPHA_SATURATE = 776;
static const uint32_t FUNC_ADD = 32774;
static const uint32_t BLEND_EQUATION = 32777;
static const uint32_t BLEND_EQUATION_RGB = 32777;
static const uint32_t BLEND_EQUATION_ALPHA = 34877;
static const uint32_t FUNC_SUBTRACT = 32778;
static const uint32_t FUNC_REVERSE_SUBTRACT = 32779;
static const uint32_t BLEND_DST_RGB = 32968;
static const uint32_t BLEND_SRC_RGB = 32969;
static const uint32_t BLEND_DST_ALPHA = 32970;
static const uint32_t BLEND_SRC_ALPHA = 32971;
static const uint32_t CONSTANT_COLOR = 32769;
static const uint32_t ONE_MINUS_CONSTANT_COLOR = 32770;
static const uint32_t CONSTANT_ALPHA = 32771;
static const uint32_t ONE_MINUS_CONSTANT_ALPHA = 32772;
static const uint32_t BLEND_COLOR = 32773;
static const uint32_t ARRAY_BUFFER = 34962;
static const uint32_t ELEMENT_ARRAY_BUFFER = 34963;
static const uint32_t ARRAY_BUFFER_BINDING = 34964;
static const uint32_t ELEMENT_ARRAY_BUFFER_BINDING = 34965;
static const uint32_t STREAM_DRAW = 35040;
static const uint32_t STATIC_DRAW = 35044;
static const uint32_t DYNAMIC_DRAW = 35048;
static const uint32_t BUFFER_SIZE = 34660;
static const uint32_t BUFFER_USAGE = 34661;
static const uint32_t CURRENT_VERTEX_ATTRIB = 34342;
static const uint32_t FRONT = 1028;
static const uint32_t BACK = 1029;
static const uint32_t FRONT_AND_BACK = 1032;
static const uint32_t CULL_FACE = 2884;
static const uint32_t BLEND = 3042;
static const uint32_t DITHER = 3024;
static const uint32_t STENCIL_TEST = 2960;
static const uint32_t DEPTH_TEST = 2929;
static const uint32_t SCISSOR_TEST = 3089;
static const uint32_t POLYGON_OFFSET_FILL = 32823;
static const uint32_t SAMPLE_ALPHA_TO_COVERAGE = 32926;
static const uint32_t SAMPLE_COVERAGE = 32928;
static const uint32_t NO_ERROR = 0;
static const uint32_t INVALID_ENUM = 1280;
static const uint32_t INVALID_VALUE = 1281;
static const uint32_t INVALID_OPERATION = 1282;
static const uint32_t OUT_OF_MEMORY = 1285;
static const uint32_t CW = 2304;
static const uint32_t CCW = 2305;
static const uint32_t LINE_WIDTH = 2849;
static const uint32_t ALIASED_POINT_SIZE_RANGE = 33901;
static const uint32_t ALIASED_LINE_WIDTH_RANGE = 33902;
static const uint32_t CULL_FACE_MODE = 2885;
static const uint32_t FRONT_FACE = 2886;
static const uint32_t DEPTH_RANGE = 2928;
static const uint32_t DEPTH_WRITEMASK = 2930;
static const uint32_t DEPTH_CLEAR_VALUE = 2931;
static const uint32_t DEPTH_FUNC = 2932;
static const uint32_t STENCIL_CLEAR_VALUE = 2961;
static const uint32_t STENCIL_FUNC = 2962;
static const uint32_t STENCIL_FAIL = 2964;
static const uint32_t STENCIL_PASS_DEPTH_FAIL = 2965;
static const uint32_t STENCIL_PASS_DEPTH_PASS = 2966;
static const uint32_t STENCIL_REF = 2967;
static const uint32_t STENCIL_VALUE_MASK = 2963;
static const uint32_t STENCIL_WRITEMASK = 2968;
static const uint32_t STENCIL_BACK_FUNC = 34816;
static const uint32_t STENCIL_BACK_FAIL = 34817;
static const uint32_t STENCIL_BACK_PASS_DEPTH_FAIL = 34818;
static const uint32_t STENCIL_BACK_PASS_DEPTH_PASS = 34819;
static const uint32_t STENCIL_BACK_REF = 36003;
static const uint32_t STENCIL_BACK_VALUE_MASK = 36004;
static const uint32_t STENCIL_BACK_WRITEMASK = 36005;
static const uint32_t VIEWPORT = 2978;
static const uint32_t SCISSOR_BOX = 3088;
static const uint32_t COLOR_CLEAR_VALUE = 3106;
static const uint32_t COLOR_WRITEMASK = 3107;
static const uint32_t UNPACK_ALIGNMENT = 3317;
static const uint32_t PACK_ALIGNMENT = 3333;
static const uint32_t MAX_TEXTURE_SIZE = 3379;
static const uint32_t MAX_VIEWPORT_DIMS = 3386;
static const uint32_t SUBPIXEL_BITS = 3408;
static const uint32_t RED_BITS = 3410;
static const uint32_t GREEN_BITS = 3411;
static const uint32_t BLUE_BITS = 3412;
static const uint32_t ALPHA_BITS = 3413;
static const uint32_t DEPTH_BITS = 3414;
static const uint32_t STENCIL_BITS = 3415;
static const uint32_t POLYGON_OFFSET_UNITS = 10752;
static const uint32_t POLYGON_OFFSET_FACTOR = 32824;
static const uint32_t TEXTURE_BINDING_2D = 32873;
static const uint32_t SAMPLE_BUFFERS = 32936;
static const uint32_t SAMPLES = 32937;
static const uint32_t SAMPLE_COVERAGE_VALUE = 32938;
static const uint32_t SAMPLE_COVERAGE_INVERT = 32939;
static const uint32_t COMPRESSED_TEXTURE_FORMATS = 34467;
static const uint32_t DONT_CARE = 4352;
static const uint32_t FASTEST = 4353;
static const uint32_t NICEST = 4354;
static const uint32_t GENERATE_MIPMAP_HINT = 33170;
static const uint32_t BYTE = 5120;
static const uint32_t UNSIGNED_BYTE = 5121;
static const uint32_t SHORT = 5122;
static const uint32_t UNSIGNED_SHORT = 5123;
static const uint32_t INT = 5124;
static const uint32_t UNSIGNED_INT = 5125;
static const uint32_t FLOAT = 5126;
static const uint32_t DEPTH_COMPONENT = 6402;
static const uint32_t ALPHA = 6406;
static const uint32_t RGB = 6407;
static const uint32_t RGBA = 6408;
static const uint32_t LUMINANCE = 6409;
static const uint32_t LUMINANCE_ALPHA = 6410;
static const uint32_t UNSIGNED_SHORT_4_4_4_4 = 32819;
static const uint32_t UNSIGNED_SHORT_5_5_5_1 = 32820;
static const uint32_t UNSIGNED_SHORT_5_6_5 = 33635;
static const uint32_t FRAGMENT_SHADER = 35632;
static const uint32_t VERTEX_SHADER = 35633;
static const uint32_t MAX_VERTEX_ATTRIBS = 34921;
static const uint32_t MAX_VERTEX_UNIFORM_VECTORS = 36347;
static const uint32_t MAX_VARYING_VECTORS = 36348;
static const uint32_t MAX_COMBINED_TEXTURE_IMAGE_UNITS = 35661;
static const uint32_t MAX_VERTEX_TEXTURE_IMAGE_UNITS = 35660;
static const uint32_t MAX_TEXTURE_IMAGE_UNITS = 34930;
static const uint32_t MAX_FRAGMENT_UNIFORM_VECTORS = 36349;
static const uint32_t SHADER_TYPE = 35663;
static const uint32_t DELETE_STATUS = 35712;
static const uint32_t LINK_STATUS = 35714;
static const uint32_t VALIDATE_STATUS = 35715;
static const uint32_t ATTACHED_SHADERS = 35717;
static const uint32_t ACTIVE_UNIFORMS = 35718;
static const uint32_t ACTIVE_ATTRIBUTES = 35721;
static const uint32_t SHADING_LANGUAGE_VERSION = 35724;
static const uint32_t CURRENT_PROGRAM = 35725;
static const uint32_t NEVER = 512;
static const uint32_t LESS = 513;
static const uint32_t EQUAL = 514;
static const uint32_t LEQUAL = 515;
static const uint32_t GREATER = 516;
static const uint32_t NOTEQUAL = 517;
static const uint32_t GEQUAL = 518;
static const uint32_t ALWAYS = 519;
static const uint32_t KEEP = 7680;
static const uint32_t REPLACE = 7681;
static const uint32_t INCR = 7682;
static const uint32_t DECR = 7683;
static const uint32_t INVERT = 5386;
static const uint32_t INCR_WRAP = 34055;
static const uint32_t DECR_WRAP = 34056;
static const uint32_t VENDOR = 7936;
static const uint32_t RENDERER = 7937;
static const uint32_t VERSION = 7938;
static const uint32_t NEAREST = 9728;
static const uint32_t LINEAR = 9729;
static const uint32_t NEAREST_MIPMAP_NEAREST = 9984;
static const uint32_t LINEAR_MIPMAP_NEAREST = 9985;
static const uint32_t NEAREST_MIPMAP_LINEAR = 9986;
static const uint32_t LINEAR_MIPMAP_LINEAR = 9987;
static const uint32_t TEXTURE_MAG_FILTER = 10240;
static const uint32_t TEXTURE_MIN_FILTER = 10241;
static const uint32_t TEXTURE_WRAP_S = 10242;
static const uint32_t TEXTURE_WRAP_T = 10243;
static const uint32_t TEXTURE_2D = 3553;
static const uint32_t TEXTURE = 5890;
static const uint32_t TEXTURE_CUBE_MAP = 34067;
static const uint32_t TEXTURE_BINDING_CUBE_MAP = 34068;
static const uint32_t TEXTURE_CUBE_MAP_POSITIVE_X = 34069;
static const uint32_t TEXTURE_CUBE_MAP_NEGATIVE_X = 34070;
static const uint32_t TEXTURE_CUBE_MAP_POSITIVE_Y = 34071;
static const uint32_t TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072;
static const uint32_t TEXTURE_CUBE_MAP_POSITIVE_Z = 34073;
static const uint32_t TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074;
static const uint32_t MAX_CUBE_MAP_TEXTURE_SIZE = 34076;
static const uint32_t TEXTURE0 = 33984;
static const uint32_t TEXTURE1 = 33985;
static const uint32_t TEXTURE2 = 33986;
static const uint32_t TEXTURE3 = 33987;
static const uint32_t TEXTURE4 = 33988;
static const uint32_t TEXTURE5 = 33989;
static const uint32_t TEXTURE6 = 33990;
static const uint32_t TEXTURE7 = 33991;
static const uint32_t TEXTURE8 = 33992;
static const uint32_t TEXTURE9 = 33993;
static const uint32_t TEXTURE10 = 33994;
static const uint32_t TEXTURE11 = 33995;
static const uint32_t TEXTURE12 = 33996;
static const uint32_t TEXTURE13 = 33997;
static const uint32_t TEXTURE14 = 33998;
static const uint32_t TEXTURE15 = 33999;
static const uint32_t TEXTURE16 = 34000;
static const uint32_t TEXTURE17 = 34001;
static const uint32_t TEXTURE18 = 34002;
static const uint32_t TEXTURE19 = 34003;
static const uint32_t TEXTURE20 = 34004;
static const uint32_t TEXTURE21 = 34005;
static const uint32_t TEXTURE22 = 34006;
static const uint32_t TEXTURE23 = 34007;
static const uint32_t TEXTURE24 = 34008;
static const uint32_t TEXTURE25 = 34009;
static const uint32_t TEXTURE26 = 34010;
static const uint32_t TEXTURE27 = 34011;
static const uint32_t TEXTURE28 = 34012;
static const uint32_t TEXTURE29 = 34013;
static const uint32_t TEXTURE30 = 34014;
static const uint32_t TEXTURE31 = 34015;
static const uint32_t ACTIVE_TEXTURE = 34016;
static const uint32_t REPEAT = 10497;
static const uint32_t CLAMP_TO_EDGE = 33071;
static const uint32_t MIRRORED_REPEAT = 33648;
static const uint32_t FLOAT_VEC2 = 35664;
static const uint32_t FLOAT_VEC3 = 35665;
static const uint32_t FLOAT_VEC4 = 35666;
static const uint32_t INT_VEC2 = 35667;
static const uint32_t INT_VEC3 = 35668;
static const uint32_t INT_VEC4 = 35669;
static const uint32_t BOOL = 35670;
static const uint32_t BOOL_VEC2 = 35671;
static const uint32_t BOOL_VEC3 = 35672;
static const uint32_t BOOL_VEC4 = 35673;
static const uint32_t FLOAT_MAT2 = 35674;
static const uint32_t FLOAT_MAT3 = 35675;
static const uint32_t FLOAT_MAT4 = 35676;
static const uint32_t SAMPLER_2D = 35678;
static const uint32_t SAMPLER_CUBE = 35680;
static const uint32_t VERTEX_ATTRIB_ARRAY_ENABLED = 34338;
static const uint32_t VERTEX_ATTRIB_ARRAY_SIZE = 34339;
static const uint32_t VERTEX_ATTRIB_ARRAY_STRIDE = 34340;
static const uint32_t VERTEX_ATTRIB_ARRAY_TYPE = 34341;
static const uint32_t VERTEX_ATTRIB_ARRAY_NORMALIZED = 34922;
static const uint32_t VERTEX_ATTRIB_ARRAY_POINTER = 34373;
static const uint32_t VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 34975;
static const uint32_t IMPLEMENTATION_COLOR_READ_TYPE = 35738;
static const uint32_t IMPLEMENTATION_COLOR_READ_FORMAT = 35739;
static const uint32_t COMPILE_STATUS = 35713;
static const uint32_t LOW_FLOAT = 36336;
static const uint32_t MEDIUM_FLOAT = 36337;
static const uint32_t HIGH_FLOAT = 36338;
static const uint32_t LOW_INT = 36339;
static const uint32_t MEDIUM_INT = 36340;
static const uint32_t HIGH_INT = 36341;
static const uint32_t FRAMEBUFFER = 36160;
static const uint32_t RENDERBUFFER = 36161;
static const uint32_t RGBA4 = 32854;
static const uint32_t RGB5_A1 = 32855;
static const uint32_t RGB565 = 36194;
static const uint32_t DEPTH_COMPONENT16 = 33189;
static const uint32_t STENCIL_INDEX8 = 36168;
static const uint32_t DEPTH_STENCIL = 34041;
static const uint32_t RENDERBUFFER_WIDTH = 36162;
static const uint32_t RENDERBUFFER_HEIGHT = 36163;
static const uint32_t RENDERBUFFER_INTERNAL_FORMAT = 36164;
static const uint32_t RENDERBUFFER_RED_SIZE = 36176;
static const uint32_t RENDERBUFFER_GREEN_SIZE = 36177;
static const uint32_t RENDERBUFFER_BLUE_SIZE = 36178;
static const uint32_t RENDERBUFFER_ALPHA_SIZE = 36179;
static const uint32_t RENDERBUFFER_DEPTH_SIZE = 36180;
static const uint32_t RENDERBUFFER_STENCIL_SIZE = 36181;
static const uint32_t FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 36048;
static const uint32_t FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 36049;
static const uint32_t FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 36050;
static const uint32_t FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 36051;
static const uint32_t COLOR_ATTACHMENT0 = 36064;
static const uint32_t DEPTH_ATTACHMENT = 36096;
static const uint32_t STENCIL_ATTACHMENT = 36128;
static const uint32_t DEPTH_STENCIL_ATTACHMENT = 33306;
static const uint32_t NONE = 0;
static const uint32_t FRAMEBUFFER_COMPLETE = 36053;
static const uint32_t FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 36054;
static const uint32_t FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 36055;
static const uint32_t FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 36057;
static const uint32_t FRAMEBUFFER_UNSUPPORTED = 36061;
static const uint32_t FRAMEBUFFER_BINDING = 36006;
static const uint32_t RENDERBUFFER_BINDING = 36007;
static const uint32_t MAX_RENDERBUFFER_SIZE = 34024;
static const uint32_t INVALID_FRAMEBUFFER_OPERATION = 1286;
static const uint32_t UNPACK_FLIP_Y_WEBGL = 37440;
static const uint32_t UNPACK_PREMULTIPLY_ALPHA_WEBGL = 37441;
static const uint32_t CONTEXT_LOST_WEBGL = 37442;
static const uint32_t UNPACK_COLORSPACE_CONVERSION_WEBGL = 37443;
static const uint32_t BROWSER_DEFAULT_WEBGL = 37444;
bool
ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
bool
Wrap(JSContext* aCx, mozilla::ClientWebGLContext* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
template <class T>
inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
{
JS::Rooted<JSObject*> reflector(aCx);
return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
}
void
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, DefineInterfaceProperty aDefineOnGlobal);
JS::Handle<JSObject*>
GetConstructorObjectHandle(JSContext* aCx);
inline bool CreateAndDefineOnGlobal(JSContext* aCx)
{
// Get the interface or namespace object for this class. This will
// create the object as needed and always define the properties for
// it on the global. The caller should make sure the interface or
// namespace is exposed on the global before calling this.
return GetPerInterfaceObjectHandle(aCx, constructors::id::WebGL2RenderingContext,
&CreateInterfaceObjects,
DefineInterfaceProperty::Always);
}
} // namespace WebGL2RenderingContext_Binding
namespace WebGLSampler_Binding {
typedef mozilla::WebGLSamplerJS NativeType;
bool
ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
bool
Wrap(JSContext* aCx, mozilla::WebGLSamplerJS* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
template <class T>
inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
{
JS::Rooted<JSObject*> reflector(aCx);
return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
}
void
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, DefineInterfaceProperty aDefineOnGlobal);
JS::Handle<JSObject*>
GetConstructorObjectHandle(JSContext* aCx);
inline bool CreateAndDefineOnGlobal(JSContext* aCx)
{
// Get the interface or namespace object for this class. This will
// create the object as needed and always define the properties for
// it on the global. The caller should make sure the interface or
// namespace is exposed on the global before calling this.
return GetPerInterfaceObjectHandle(aCx, constructors::id::WebGLSampler,
&CreateInterfaceObjects,
DefineInterfaceProperty::Always);
}
} // namespace WebGLSampler_Binding
namespace WebGLSync_Binding {
typedef mozilla::WebGLSyncJS NativeType;
bool
ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
bool
Wrap(JSContext* aCx, mozilla::WebGLSyncJS* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
template <class T>
inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
{
JS::Rooted<JSObject*> reflector(aCx);
return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
}
void
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, DefineInterfaceProperty aDefineOnGlobal);
JS::Handle<JSObject*>
GetConstructorObjectHandle(JSContext* aCx);
inline bool CreateAndDefineOnGlobal(JSContext* aCx)
{
// Get the interface or namespace object for this class. This will
// create the object as needed and always define the properties for
// it on the global. The caller should make sure the interface or
// namespace is exposed on the global before calling this.
return GetPerInterfaceObjectHandle(aCx, constructors::id::WebGLSync,
&CreateInterfaceObjects,
DefineInterfaceProperty::Always);
}
} // namespace WebGLSync_Binding
namespace WebGLTransformFeedback_Binding {
typedef mozilla::WebGLTransformFeedbackJS NativeType;
bool
ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
bool
Wrap(JSContext* aCx, mozilla::WebGLTransformFeedbackJS* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
template <class T>
inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
{
JS::Rooted<JSObject*> reflector(aCx);
return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
}
void
CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, DefineInterfaceProperty aDefineOnGlobal);
JS::Handle<JSObject*>
GetConstructorObjectHandle(JSContext* aCx);
inline bool CreateAndDefineOnGlobal(JSContext* aCx)
{
// Get the interface or namespace object for this class. This will
// create the object as needed and always define the properties for
// it on the global. The caller should make sure the interface or
// namespace is exposed on the global before calling this.
return GetPerInterfaceObjectHandle(aCx, constructors::id::WebGLTransformFeedback,
&CreateInterfaceObjects,
DefineInterfaceProperty::Always);
}
} // namespace WebGLTransformFeedback_Binding
} // namespace mozilla::dom
#endif // DOM_WEBGL2RENDERINGCONTEXTBINDING_H_