mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-02 12:07:52 +00:00
Bug 1002302 - WebGL2 - Stub WebGL 2.0 WebIDL, WebGL 2.0 Objects, and functions in WebGL2Context.; r=jgilbert,bjacob,smaug
--HG-- extra : rebase_source : a7f9510b34a9f43afc0418c50b8821928c2a4262 extra : source : 89c2a61cd4c543c78b9bf0963f0227488fa27802
This commit is contained in:
parent
4a7eef6b52
commit
bdf0470856
@ -1355,11 +1355,16 @@ DOMInterfaces = {
|
||||
},
|
||||
|
||||
'WebGL2RenderingContext': {
|
||||
'nativeType': 'mozilla::WebGLContext',
|
||||
'headerFile': 'WebGLContext.h',
|
||||
'nativeType': 'mozilla::WebGL2Context',
|
||||
'headerFile': 'WebGL2Context.h',
|
||||
'implicitJSContext': [ 'getSupportedExtensions' ],
|
||||
},
|
||||
|
||||
'WebGLSampler': {
|
||||
'nativeType': 'mozilla::WebGLSampler',
|
||||
'headerFile': 'WebGLSampler.h'
|
||||
},
|
||||
|
||||
'WebGLShader': {
|
||||
'nativeType': 'mozilla::WebGLShader',
|
||||
'headerFile': 'WebGLShader.h'
|
||||
@ -1371,11 +1376,21 @@ DOMInterfaces = {
|
||||
'wrapperCache': False
|
||||
},
|
||||
|
||||
'WebGLSync': {
|
||||
'nativeType': 'mozilla::WebGLSync',
|
||||
'headerFile': 'WebGLSync.h'
|
||||
},
|
||||
|
||||
'WebGLTexture': {
|
||||
'nativeType': 'mozilla::WebGLTexture',
|
||||
'headerFile': 'WebGLTexture.h'
|
||||
},
|
||||
|
||||
'WebGLTransformFeedback': {
|
||||
'nativeType': 'mozilla::WebGLTransformFeedback',
|
||||
'headerFile': 'WebGLTransformFeedback.h'
|
||||
},
|
||||
|
||||
'WebGLUniformLocation': {
|
||||
'nativeType': 'mozilla::WebGLUniformLocation',
|
||||
'headerFile': 'WebGLUniformLocation.h',
|
||||
|
@ -10,52 +10,233 @@
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class WebGLSampler;
|
||||
class WebGLSync;
|
||||
class WebGLTransformFeedback;
|
||||
class WebGLVertexArrayObject;
|
||||
|
||||
class WebGL2Context
|
||||
: public WebGLContext
|
||||
{
|
||||
// -----------------------------------------------------------------------------
|
||||
// PUBLIC
|
||||
public:
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// DESTRUCTOR
|
||||
|
||||
virtual ~WebGL2Context();
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// STATIC FUNCTIONS
|
||||
|
||||
static bool IsSupported();
|
||||
|
||||
static WebGL2Context* Create();
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// IMPLEMENT WebGLContext
|
||||
|
||||
virtual bool IsWebGL2() const MOZ_OVERRIDE
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// IMPLEMENT nsWrapperCache
|
||||
|
||||
virtual JSObject* WrapObject(JSContext *cx) MOZ_OVERRIDE;
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// PRIVATE
|
||||
private:
|
||||
// -------------------------------------------------------------------------
|
||||
// Buffer objects - WebGL2ContextBuffers.cpp
|
||||
|
||||
void CopyBufferSubData(GLenum readTarget, GLenum writeTarget,
|
||||
GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
||||
void GetBufferSubData(GLenum target, GLintptr offset, const dom::ArrayBuffer& returnedData);
|
||||
void GetBufferSubData(GLenum target, GLintptr offset, const dom::ArrayBufferView& returnedData);
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// CONSTRUCTOR
|
||||
// Framebuffer objects - WebGL2ContextFramebuffers.cpp
|
||||
|
||||
void BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
|
||||
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
|
||||
GLbitfield mask, GLenum filter);
|
||||
void FramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
|
||||
void GetInternalformatParameter(JSContext*, GLenum target, GLenum internalformat, GLenum pname, JS::MutableHandleValue retval);
|
||||
void InvalidateFramebuffer(GLenum target, const dom::Sequence<GLenum>& attachments);
|
||||
void InvalidateSubFramebuffer (GLenum target, const dom::Sequence<GLenum>& attachments, GLint x, GLint y,
|
||||
GLsizei width, GLsizei height);
|
||||
void ReadBuffer(GLenum mode);
|
||||
void RenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat,
|
||||
GLsizei width, GLsizei height);
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Texture objects - WebGL2ContextTextures.cpp
|
||||
|
||||
void TexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
void TexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height,
|
||||
GLsizei depth);
|
||||
|
||||
void TexSubImage3D(GLenum target, GLint level,
|
||||
GLint xoffset, GLint yoffset, GLint zoffset,
|
||||
GLsizei width, GLsizei height, GLsizei depth,
|
||||
GLenum format, GLenum type, const Nullable<dom::ArrayBufferView>& pixels,
|
||||
ErrorResult& rv);
|
||||
void TexSubImage3D(GLenum target, GLint level,
|
||||
GLint xoffset, GLint yoffset, GLint zoffset,
|
||||
GLenum format, GLenum type, dom::ImageData* data,
|
||||
ErrorResult& rv);
|
||||
template<class ElementType>
|
||||
void TexSubImage3D(GLenum target, GLint level,
|
||||
GLint xoffset, GLint yoffset, GLint zoffset,
|
||||
GLenum format, GLenum type, ElementType& elt, ErrorResult& rv)
|
||||
{}
|
||||
|
||||
void CopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
|
||||
GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
void CompressedTexImage3D(GLenum target, GLint level, GLenum internalformat,
|
||||
GLsizei width, GLsizei height, GLsizei depth,
|
||||
GLint border, GLsizei imageSize, const dom::ArrayBufferView& data);
|
||||
void CompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
|
||||
GLsizei width, GLsizei height, GLsizei depth,
|
||||
GLenum format, GLsizei imageSize, const dom::ArrayBufferView& data);
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Programs and shaders - WebGL2ContextPrograms.cpp
|
||||
GLint GetFragDataLocation(WebGLProgram* program, const nsAString& name);
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Uniforms and attributes - WebGL2ContextUniforms.cpp
|
||||
void VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
|
||||
|
||||
void Uniform1ui(WebGLUniformLocation* location, GLuint v0);
|
||||
void Uniform2ui(WebGLUniformLocation* location, GLuint v0, GLuint v1);
|
||||
void Uniform3ui(WebGLUniformLocation* location, GLuint v0, GLuint v1, GLuint v2);
|
||||
void Uniform4ui(WebGLUniformLocation* location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
|
||||
void Uniform1uiv(WebGLUniformLocation* location, const dom::Sequence<GLuint>& value);
|
||||
void Uniform2uiv(WebGLUniformLocation* location, const dom::Sequence<GLuint>& value);
|
||||
void Uniform3uiv(WebGLUniformLocation* location, const dom::Sequence<GLuint>& value);
|
||||
void Uniform4uiv(WebGLUniformLocation* location, const dom::Sequence<GLuint>& value);
|
||||
void UniformMatrix2x3fv(WebGLUniformLocation* location, bool transpose, const dom::Float32Array& value);
|
||||
void UniformMatrix2x3fv(WebGLUniformLocation* location, bool transpose, const dom::Sequence<GLfloat>& value);
|
||||
void UniformMatrix3x2fv(WebGLUniformLocation* location, bool transpose, const dom::Float32Array& value);
|
||||
void UniformMatrix3x2fv(WebGLUniformLocation* location, bool transpose, const dom::Sequence<GLfloat>& value);
|
||||
void UniformMatrix2x4fv(WebGLUniformLocation* location, bool transpose, const dom::Float32Array& value);
|
||||
void UniformMatrix2x4fv(WebGLUniformLocation* location, bool transpose, const dom::Sequence<GLfloat>& value);
|
||||
void UniformMatrix4x2fv(WebGLUniformLocation* location, bool transpose, const dom::Float32Array& value);
|
||||
void UniformMatrix4x2fv(WebGLUniformLocation* location, bool transpose, const dom::Sequence<GLfloat>& value);
|
||||
void UniformMatrix3x4fv(WebGLUniformLocation* location, bool transpose, const dom::Float32Array& value);
|
||||
void UniformMatrix3x4fv(WebGLUniformLocation* location, bool transpose, const dom::Sequence<GLfloat>& value);
|
||||
void UniformMatrix4x3fv(WebGLUniformLocation* location, bool transpose, const dom::Float32Array& value);
|
||||
void UniformMatrix4x3fv(WebGLUniformLocation* location, bool transpose, const dom::Sequence<GLfloat>& value);
|
||||
|
||||
void VertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w);
|
||||
void VertexAttribI4iv(GLuint index, const dom::Sequence<GLint>& v);
|
||||
void VertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
|
||||
void VertexAttribI4uiv(GLuint index, const dom::Sequence<GLuint>& v);
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Writing to the drawing buffer
|
||||
// TODO(djg): Implemented in WebGLContext
|
||||
/*
|
||||
void VertexAttribDivisor(GLuint index, GLuint divisor);
|
||||
void DrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount);
|
||||
void DrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei instanceCount);
|
||||
*/
|
||||
void DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLintptr offset);
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Multiple Render Targets - WebGL2ContextMRTs.cpp
|
||||
// TODO(djg): Implemented in WebGLContext
|
||||
/*
|
||||
void DrawBuffers(const dom::Sequence<GLenum>& buffers);
|
||||
*/
|
||||
void ClearBufferiv(GLenum buffer, GLint drawbuffer, const dom::Int32Array& value);
|
||||
void ClearBufferiv(GLenum buffer, GLint drawbuffer, const dom::Sequence<GLint>& value);
|
||||
void ClearBufferuiv(GLenum buffer, GLint drawbuffer, const dom::Uint32Array& value);
|
||||
void ClearBufferuiv(GLenum buffer, GLint drawbuffer, const dom::Sequence<GLuint>& value);
|
||||
void ClearBufferfv(GLenum buffer, GLint drawbuffer, const dom::Float32Array& value);
|
||||
void ClearBufferfv(GLenum buffer, GLint drawbuffer, const dom::Sequence<GLfloat>& value);
|
||||
void ClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Query Objects - WebGL2ContextQueries.cpp
|
||||
// TODO(djg): Implemented in WebGLContext
|
||||
/* already_AddRefed<WebGLQuery> CreateQuery();
|
||||
void DeleteQuery(WebGLQuery* query);
|
||||
bool IsQuery(WebGLQuery* query);
|
||||
void BeginQuery(GLenum target, WebGLQuery* query);
|
||||
void EndQuery(GLenum target);
|
||||
JS::Value GetQuery(JSContext*, GLenum target, GLenum pname); */
|
||||
void GetQueryParameter(JSContext*, WebGLQuery* query, GLenum pname, JS::MutableHandleValue retval);
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Sampler Objects - WebGL2ContextSamplers.cpp
|
||||
|
||||
already_AddRefed<WebGLSampler> CreateSampler();
|
||||
void DeleteSampler(WebGLSampler* sampler);
|
||||
bool IsSampler(WebGLSampler* sampler);
|
||||
void BindSampler(GLuint unit, WebGLSampler* sampler);
|
||||
void SamplerParameteri(WebGLSampler* sampler, GLenum pname, GLint param);
|
||||
void SamplerParameteriv(WebGLSampler* sampler, GLenum pname, const dom::Int32Array& param);
|
||||
void SamplerParameteriv(WebGLSampler* sampler, GLenum pname, const dom::Sequence<GLint>& param);
|
||||
void SamplerParameterf(WebGLSampler* sampler, GLenum pname, GLfloat param);
|
||||
void SamplerParameterfv(WebGLSampler* sampler, GLenum pname, const dom::Float32Array& param);
|
||||
void SamplerParameterfv(WebGLSampler* sampler, GLenum pname, const dom::Sequence<GLfloat>& param);
|
||||
void GetSamplerParameter(JSContext*, WebGLSampler* sampler, GLenum pname, JS::MutableHandleValue retval);
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Sync objects - WebGL2ContextSync.cpp
|
||||
|
||||
already_AddRefed<WebGLSync> FenceSync(GLenum condition, GLbitfield flags);
|
||||
bool IsSync(WebGLSync* sync);
|
||||
void DeleteSync(WebGLSync* sync);
|
||||
GLenum ClientWaitSync(WebGLSync* sync, GLbitfield flags, GLuint64 timeout);
|
||||
void WaitSync(WebGLSync* sync, GLbitfield flags, GLuint64 timeout);
|
||||
void GetSyncParameter(JSContext*, WebGLSync* sync, GLenum pname, JS::MutableHandleValue retval);
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Transform Feedback - WebGL2ContextTransformFeedback.cpp
|
||||
already_AddRefed<WebGLTransformFeedback> CreateTransformFeedback();
|
||||
void DeleteTransformFeedback(WebGLTransformFeedback* tf);
|
||||
bool IsTransformFeedback(WebGLTransformFeedback* tf);
|
||||
void BindTransformFeedback(GLenum target, GLuint id);
|
||||
void BeginTransformFeedback(GLenum primitiveMode);
|
||||
void EndTransformFeedback();
|
||||
void TransformFeedbackVaryings(WebGLProgram* program, GLsizei count,
|
||||
const dom::Sequence<nsString>& varyings, GLenum bufferMode);
|
||||
already_AddRefed<WebGLActiveInfo> GetTransformFeedbackVarying(WebGLProgram* program, GLuint index);
|
||||
void PauseTransformFeedback();
|
||||
void ResumeTransformFeedback();
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Uniform Buffer Objects and Transform Feedback Buffers - WebGL2ContextUniforms.cpp
|
||||
// TODO(djg): Implemented in WebGLContext
|
||||
/*
|
||||
void BindBufferBase(GLenum target, GLuint index, WebGLBuffer* buffer);
|
||||
void BindBufferRange(GLenum target, GLuint index, WebGLBuffer* buffer, GLintptr offset, GLsizeiptr size);
|
||||
*/
|
||||
void GetIndexedParameter(JSContext*, GLenum target, GLuint index, JS::MutableHandleValue retval);
|
||||
void GetUniformIndices(WebGLProgram* program, const dom::Sequence<nsString>& uniformNames, dom::Nullable< nsTArray<GLuint> >& retval);
|
||||
void GetActiveUniforms(WebGLProgram* program, const dom::Sequence<GLuint>& uniformIndices, GLenum pname,
|
||||
dom::Nullable< nsTArray<GLint> >& retval);
|
||||
GLuint GetUniformBlockIndex(WebGLProgram* program, const nsAString& uniformBlockName);
|
||||
void GetActiveUniformBlockParameter(JSContext*, WebGLProgram* program, GLuint uniformBlockIndex, GLenum pname, JS::MutableHandleValue retval);
|
||||
void GetActiveUniformBlockName(WebGLProgram* program, GLuint uniformBlockIndex, dom::DOMString& retval);
|
||||
void UniformBlockBinding(WebGLProgram* program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Vertex Array Object - WebGL2ContextVAOs.cpp
|
||||
// TODO(djg): Implemented in WebGLContext
|
||||
/*
|
||||
already_AddRefed<WebGLVertexArrayObject> CreateVertexArray();
|
||||
void DeleteVertexArray(WebGLVertexArrayObject* vertexArray);
|
||||
bool IsVertexArray(WebGLVertexArrayObject* vertexArray);
|
||||
void BindVertexArray(WebGLVertexArrayObject* vertexArray);
|
||||
*/
|
||||
|
||||
private:
|
||||
|
||||
WebGL2Context();
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
32
dom/canvas/WebGL2ContextBuffers.cpp
Normal file
32
dom/canvas/WebGL2ContextBuffers.cpp
Normal file
@ -0,0 +1,32 @@
|
||||
/* -*- 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/. */
|
||||
|
||||
#include "WebGL2Context.h"
|
||||
#include "GLContext.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Buffer objects
|
||||
|
||||
void
|
||||
WebGL2Context::CopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset,
|
||||
GLintptr writeOffset, GLsizeiptr size)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::GetBufferSubData(GLenum target, GLintptr offset, const dom::ArrayBuffer& returnedData)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::GetBufferSubData(GLenum target, GLintptr offset, const dom::ArrayBufferView& returnedData)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
19
dom/canvas/WebGL2ContextDraw.cpp
Normal file
19
dom/canvas/WebGL2ContextDraw.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
/* -*- 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/. */
|
||||
|
||||
#include "WebGL2Context.h"
|
||||
#include "GLContext.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Writing to the drawing buffer
|
||||
|
||||
void
|
||||
WebGL2Context::DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLintptr offset)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
59
dom/canvas/WebGL2ContextFramebuffers.cpp
Normal file
59
dom/canvas/WebGL2ContextFramebuffers.cpp
Normal file
@ -0,0 +1,59 @@
|
||||
/* -*- 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/. */
|
||||
|
||||
#include "WebGL2Context.h"
|
||||
#include "GLContext.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Framebuffer objects
|
||||
|
||||
void
|
||||
WebGL2Context::BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
|
||||
GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
|
||||
GLbitfield mask, GLenum filter)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::FramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::GetInternalformatParameter(JSContext*, GLenum target, GLenum internalformat, GLenum pname, JS::MutableHandleValue retval)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::InvalidateFramebuffer(GLenum target, const dom::Sequence<GLenum>& attachments)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::InvalidateSubFramebuffer (GLenum target, const dom::Sequence<GLenum>& attachments,
|
||||
GLint x, GLint y, GLsizei width, GLsizei height)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::ReadBuffer(GLenum mode)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::RenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat,
|
||||
GLsizei width, GLsizei height)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
52
dom/canvas/WebGL2ContextMRTs.cpp
Normal file
52
dom/canvas/WebGL2ContextMRTs.cpp
Normal file
@ -0,0 +1,52 @@
|
||||
/* -*- 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/. */
|
||||
|
||||
#include "WebGL2Context.h"
|
||||
#include "GLContext.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
void
|
||||
WebGL2Context::ClearBufferiv(GLenum buffer, GLint drawbuffer, const dom::Int32Array& value)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::ClearBufferiv(GLenum buffer, GLint drawbuffer, const dom::Sequence<GLint>& value)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::ClearBufferuiv(GLenum buffer, GLint drawbuffer, const dom::Uint32Array& value)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::ClearBufferuiv(GLenum buffer, GLint drawbuffer, const dom::Sequence<GLuint>& value)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::ClearBufferfv(GLenum buffer, GLint drawbuffer, const dom::Float32Array& value)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::ClearBufferfv(GLenum buffer, GLint drawbuffer, const dom::Sequence<GLfloat>& value)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::ClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
19
dom/canvas/WebGL2ContextPrograms.cpp
Normal file
19
dom/canvas/WebGL2ContextPrograms.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
/* -*- 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/. */
|
||||
|
||||
#include "WebGL2Context.h"
|
||||
#include "GLContext.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Programs and shaders
|
||||
GLint
|
||||
WebGL2Context::GetFragDataLocation(WebGLProgram* program, const nsAString& name)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
return 0;
|
||||
}
|
28
dom/canvas/WebGL2ContextQueries.cpp
Normal file
28
dom/canvas/WebGL2ContextQueries.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
/* -*- 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/. */
|
||||
|
||||
#include "WebGL2Context.h"
|
||||
#include "GLContext.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Query Objects
|
||||
// TODO(djg): Implemented in WebGLContext
|
||||
|
||||
/*
|
||||
already_AddRefed<WebGLQuery> CreateQuery();
|
||||
void DeleteQuery(WebGLQuery* query);
|
||||
bool IsQuery(WebGLQuery* query);
|
||||
void BeginQuery(GLenum target, WebGLQuery* query);
|
||||
void EndQuery(GLenum target);
|
||||
JS::Value GetQuery(JSContext*, GLenum target, GLenum pname);
|
||||
*/
|
||||
void
|
||||
WebGL2Context::GetQueryParameter(JSContext*, WebGLQuery* query, GLenum pname, JS::MutableHandleValue retval)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented");
|
||||
}
|
78
dom/canvas/WebGL2ContextSamplers.cpp
Normal file
78
dom/canvas/WebGL2ContextSamplers.cpp
Normal file
@ -0,0 +1,78 @@
|
||||
/* -*- 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/. */
|
||||
|
||||
#include "WebGL2Context.h"
|
||||
#include "GLContext.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
already_AddRefed<WebGLSampler>
|
||||
WebGL2Context::CreateSampler()
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::DeleteSampler(WebGLSampler* sampler)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
bool
|
||||
WebGL2Context::IsSampler(WebGLSampler* sampler)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::BindSampler(GLuint unit, WebGLSampler* sampler)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::SamplerParameteri(WebGLSampler* sampler, GLenum pname, GLint param)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::SamplerParameteriv(WebGLSampler* sampler, GLenum pname, const dom::Int32Array& param)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::SamplerParameteriv(WebGLSampler* sampler, GLenum pname, const dom::Sequence<GLint>& param)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::SamplerParameterf(WebGLSampler* sampler, GLenum pname, GLfloat param)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::SamplerParameterfv(WebGLSampler* sampler, GLenum pname, const dom::Float32Array& param)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::SamplerParameterfv(WebGLSampler* sampler, GLenum pname, const dom::Sequence<GLfloat>& param)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::GetSamplerParameter(JSContext*, WebGLSampler* sampler, GLenum pname, JS::MutableHandleValue retval)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
52
dom/canvas/WebGL2ContextSync.cpp
Normal file
52
dom/canvas/WebGL2ContextSync.cpp
Normal file
@ -0,0 +1,52 @@
|
||||
/* -*- 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/. */
|
||||
|
||||
#include "WebGL2Context.h"
|
||||
#include "GLContext.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Sync objects
|
||||
|
||||
already_AddRefed<WebGLSync>
|
||||
WebGL2Context::FenceSync(GLenum condition, GLbitfield flags)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool
|
||||
WebGL2Context::IsSync(WebGLSync* sync)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::DeleteSync(WebGLSync* sync)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
GLenum
|
||||
WebGL2Context::ClientWaitSync(WebGLSync* sync, GLbitfield flags, GLuint64 timeout)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
return LOCAL_GL_FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::WaitSync(WebGLSync* sync, GLbitfield flags, GLuint64 timeout)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::GetSyncParameter(JSContext*, WebGLSync* sync, GLenum pname, JS::MutableHandleValue retval)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
69
dom/canvas/WebGL2ContextTextures.cpp
Normal file
69
dom/canvas/WebGL2ContextTextures.cpp
Normal file
@ -0,0 +1,69 @@
|
||||
/* -*- 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/. */
|
||||
|
||||
#include "WebGL2Context.h"
|
||||
#include "GLContext.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Texture objects
|
||||
|
||||
void
|
||||
WebGL2Context::TexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::TexStorage3D(GLenum target, GLsizei levels, GLenum internalformat,
|
||||
GLsizei width, GLsizei height, GLsizei depth)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::TexSubImage3D(GLenum target, GLint level,
|
||||
GLint xoffset, GLint yoffset, GLint zoffset,
|
||||
GLsizei width, GLsizei height, GLsizei depth,
|
||||
GLenum format, GLenum type, const Nullable<dom::ArrayBufferView>& pixels,
|
||||
ErrorResult& rv)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::TexSubImage3D(GLenum target, GLint level,
|
||||
GLint xoffset, GLint yoffset, GLint zoffset,
|
||||
GLenum format, GLenum type, dom::ImageData* data,
|
||||
ErrorResult& rv)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::CopyTexSubImage3D(GLenum target, GLint level,
|
||||
GLint xoffset, GLint yoffset, GLint zoffset,
|
||||
GLint x, GLint y, GLsizei width, GLsizei height)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::CompressedTexImage3D(GLenum target, GLint level, GLenum internalformat,
|
||||
GLsizei width, GLsizei height, GLsizei depth,
|
||||
GLint border, GLsizei imageSize, const dom::ArrayBufferView& data)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::CompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
|
||||
GLsizei width, GLsizei height, GLsizei depth,
|
||||
GLenum format, GLsizei imageSize, const dom::ArrayBufferView& data)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
78
dom/canvas/WebGL2ContextTransformFeedback.cpp
Normal file
78
dom/canvas/WebGL2ContextTransformFeedback.cpp
Normal file
@ -0,0 +1,78 @@
|
||||
/* -*- 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/. */
|
||||
|
||||
#include "WebGL2Context.h"
|
||||
#include "GLContext.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Transform Feedback
|
||||
|
||||
already_AddRefed<WebGLTransformFeedback>
|
||||
WebGL2Context::CreateTransformFeedback()
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::DeleteTransformFeedback(WebGLTransformFeedback* tf)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
bool
|
||||
WebGL2Context::IsTransformFeedback(WebGLTransformFeedback* tf)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::BindTransformFeedback(GLenum target, GLuint id)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::BeginTransformFeedback(GLenum primitiveMode)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::EndTransformFeedback()
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::TransformFeedbackVaryings(WebGLProgram* program, GLsizei count,
|
||||
const dom::Sequence<nsString>& varyings, GLenum bufferMode)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
|
||||
already_AddRefed<WebGLActiveInfo>
|
||||
WebGL2Context::GetTransformFeedbackVarying(WebGLProgram* program, GLuint index)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::PauseTransformFeedback()
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::ResumeTransformFeedback()
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
221
dom/canvas/WebGL2ContextUniforms.cpp
Normal file
221
dom/canvas/WebGL2ContextUniforms.cpp
Normal file
@ -0,0 +1,221 @@
|
||||
/* -*- 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/. */
|
||||
|
||||
#include "WebGL2Context.h"
|
||||
#include "GLContext.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Uniforms and attributes
|
||||
|
||||
void
|
||||
WebGL2Context::VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::Uniform1ui(WebGLUniformLocation* location, GLuint v0)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::Uniform2ui(WebGLUniformLocation* location, GLuint v0, GLuint v1)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::Uniform3ui(WebGLUniformLocation* location, GLuint v0, GLuint v1, GLuint v2)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::Uniform4ui(WebGLUniformLocation* location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::Uniform1uiv(WebGLUniformLocation* location, const dom::Sequence<GLuint>& value)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::Uniform2uiv(WebGLUniformLocation* location, const dom::Sequence<GLuint>& value)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::Uniform3uiv(WebGLUniformLocation* location, const dom::Sequence<GLuint>& value)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::Uniform4uiv(WebGLUniformLocation* location, const dom::Sequence<GLuint>& value)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::UniformMatrix2x3fv(WebGLUniformLocation* location, bool transpose, const dom::Float32Array& value)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::UniformMatrix2x3fv(WebGLUniformLocation* location, bool transpose, const dom::Sequence<GLfloat>& value)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::UniformMatrix3x2fv(WebGLUniformLocation* location, bool transpose, const dom::Float32Array& value)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::UniformMatrix3x2fv(WebGLUniformLocation* location, bool transpose, const dom::Sequence<GLfloat>& value)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::UniformMatrix2x4fv(WebGLUniformLocation* location, bool transpose, const dom::Float32Array& value)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::UniformMatrix2x4fv(WebGLUniformLocation* location, bool transpose, const dom::Sequence<GLfloat>& value)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::UniformMatrix4x2fv(WebGLUniformLocation* location, bool transpose, const dom::Float32Array& value)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::UniformMatrix4x2fv(WebGLUniformLocation* location, bool transpose, const dom::Sequence<GLfloat>& value)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::UniformMatrix3x4fv(WebGLUniformLocation* location, bool transpose, const dom::Float32Array& value)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::UniformMatrix3x4fv(WebGLUniformLocation* location, bool transpose, const dom::Sequence<GLfloat>& value)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::UniformMatrix4x3fv(WebGLUniformLocation* location, bool transpose, const dom::Float32Array& value)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::UniformMatrix4x3fv(WebGLUniformLocation* location, bool transpose, const dom::Sequence<GLfloat>& value)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::VertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::VertexAttribI4iv(GLuint index, const dom::Sequence<GLint>& v)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::VertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::VertexAttribI4uiv(GLuint index, const dom::Sequence<GLuint>& v)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Uniform Buffer Objects and Transform Feedback Buffers
|
||||
// TODO(djg): Implemented in WebGLContext
|
||||
/*
|
||||
void BindBufferBase(GLenum target, GLuint index, WebGLBuffer* buffer);
|
||||
void BindBufferRange(GLenum target, GLuint index, WebGLBuffer* buffer, GLintptr offset, GLsizeiptr size);
|
||||
*/
|
||||
|
||||
void
|
||||
WebGL2Context::GetIndexedParameter(JSContext*, GLenum target, GLuint index, JS::MutableHandleValue retval)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::GetUniformIndices(WebGLProgram* program,
|
||||
const dom::Sequence<nsString>& uniformNames,
|
||||
dom::Nullable< nsTArray<GLuint> >& retval)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::GetActiveUniforms(WebGLProgram* program,
|
||||
const dom::Sequence<GLuint>& uniformIndices,
|
||||
GLenum pname,
|
||||
dom::Nullable< nsTArray<GLint> >& retval)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
GLuint
|
||||
WebGL2Context::GetUniformBlockIndex(WebGLProgram* program, const nsAString& uniformBlockName)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::GetActiveUniformBlockParameter(JSContext*, WebGLProgram* program,
|
||||
GLuint uniformBlockIndex, GLenum pname,
|
||||
JS::MutableHandleValue retval)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::GetActiveUniformBlockName(WebGLProgram* program, GLuint uniformBlockIndex, dom::DOMString& retval)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
void
|
||||
WebGL2Context::UniformBlockBinding(WebGLProgram* program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
20
dom/canvas/WebGL2ContextVAOs.cpp
Normal file
20
dom/canvas/WebGL2ContextVAOs.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
/* -*- 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/. */
|
||||
|
||||
#include "WebGL2Context.h"
|
||||
#include "GLContext.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Vertex Array Object
|
||||
// TODO(djg): Implemented in WebGLContext
|
||||
/*
|
||||
already_AddRefed<WebGLVertexArrayObject> CreateVertexArray();
|
||||
void DeleteVertexArray(WebGLVertexArrayObject* vertexArray);
|
||||
bool IsVertexArray(WebGLVertexArrayObject* vertexArray);
|
||||
void BindVertexArray(WebGLVertexArrayObject* vertexArray);
|
||||
*/
|
49
dom/canvas/WebGLSampler.cpp
Normal file
49
dom/canvas/WebGLSampler.cpp
Normal file
@ -0,0 +1,49 @@
|
||||
/* -*- Mode: C++; tab-width: 20; 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/. */
|
||||
|
||||
#include "WebGLContext.h"
|
||||
#include "WebGLSampler.h"
|
||||
|
||||
#include "GLContext.h"
|
||||
|
||||
#include "mozilla/dom/WebGL2RenderingContextBinding.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
WebGLSampler::WebGLSampler(WebGLContext* context)
|
||||
: WebGLBindableName()
|
||||
, WebGLContextBoundObject(context)
|
||||
{
|
||||
SetIsDOMBinding();
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
WebGLSampler::~WebGLSampler()
|
||||
{}
|
||||
|
||||
void
|
||||
WebGLSampler::Delete()
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
WebGLContext*
|
||||
WebGLSampler::GetParentObject() const
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
JSObject*
|
||||
WebGLSampler::WrapObject(JSContext* cx)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
return dom::WebGLSamplerBinding::Wrap(cx, this);
|
||||
}
|
||||
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(WebGLSampler)
|
||||
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(WebGLSampler, AddRef)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(WebGLSampler, Release)
|
46
dom/canvas/WebGLSampler.h
Normal file
46
dom/canvas/WebGLSampler.h
Normal file
@ -0,0 +1,46 @@
|
||||
/* -*- 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 WEBGL2SAMPLER_H_
|
||||
#define WEBGL2SAMPLER_H_
|
||||
|
||||
#include "WebGLBindableName.h"
|
||||
#include "WebGLObjectModel.h"
|
||||
|
||||
#include "nsWrapperCache.h"
|
||||
|
||||
#include "mozilla/LinkedList.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class WebGLSampler MOZ_FINAL
|
||||
: public WebGLBindableName
|
||||
, public nsWrapperCache
|
||||
, public WebGLRefCountedObject<WebGLSampler>
|
||||
, public LinkedListElement<WebGLSampler>
|
||||
, public WebGLContextBoundObject
|
||||
{
|
||||
friend class WebGLContext2;
|
||||
|
||||
public:
|
||||
|
||||
WebGLSampler(WebGLContext* context);
|
||||
|
||||
void Delete();
|
||||
WebGLContext* GetParentObject() const;
|
||||
|
||||
virtual JSObject* WrapObject(JSContext* cx) MOZ_OVERRIDE;
|
||||
|
||||
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(WebGLSampler)
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(WebGLSampler)
|
||||
|
||||
private:
|
||||
|
||||
~WebGLSampler();
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // !WEBGL2SAMPLER_H_
|
44
dom/canvas/WebGLSync.cpp
Normal file
44
dom/canvas/WebGLSync.cpp
Normal file
@ -0,0 +1,44 @@
|
||||
/* -*- 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/. */
|
||||
|
||||
#include "WebGLSync.h"
|
||||
|
||||
#include "mozilla/dom/WebGL2RenderingContextBinding.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
WebGLSync::WebGLSync(WebGLContext* context) :
|
||||
WebGLContextBoundObject(context)
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
WebGLSync::~WebGLSync()
|
||||
{}
|
||||
|
||||
void
|
||||
WebGLSync::Delete()
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
WebGLContext*
|
||||
WebGLSync::GetParentObject() const
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// IMPLEMENT NS
|
||||
JSObject*
|
||||
WebGLSync::WrapObject(JSContext *cx)
|
||||
{
|
||||
return dom::WebGLSyncBinding::Wrap(cx, this);
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(WebGLSync)
|
||||
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(WebGLSync, AddRef)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(WebGLSync, Release);
|
46
dom/canvas/WebGLSync.h
Normal file
46
dom/canvas/WebGLSync.h
Normal file
@ -0,0 +1,46 @@
|
||||
/* -*- 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 WEBGLSYNC_H_
|
||||
#define WEBGLSYNC_H_
|
||||
|
||||
#include "WebGLObjectModel.h"
|
||||
|
||||
#include "nsWrapperCache.h"
|
||||
|
||||
#include "mozilla/LinkedList.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class WebGLSync MOZ_FINAL
|
||||
: public nsWrapperCache
|
||||
, public WebGLRefCountedObject<WebGLSync>
|
||||
, public LinkedListElement<WebGLSync>
|
||||
, public WebGLContextBoundObject
|
||||
{
|
||||
friend class WebGL2Context;
|
||||
|
||||
public:
|
||||
|
||||
WebGLSync(WebGLContext* context);
|
||||
|
||||
void Delete();
|
||||
WebGLContext* GetParentObject() const;
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// IMPLEMENT NS
|
||||
virtual JSObject* WrapObject(JSContext* cx) MOZ_OVERRIDE;
|
||||
|
||||
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(WebGLSync)
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(WebGLSync)
|
||||
|
||||
private:
|
||||
|
||||
~WebGLSync();
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // !WEBGLSYNC_H_
|
48
dom/canvas/WebGLTransformFeedback.cpp
Normal file
48
dom/canvas/WebGLTransformFeedback.cpp
Normal file
@ -0,0 +1,48 @@
|
||||
/* -*- 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/. */
|
||||
|
||||
#include "WebGL2Context.h"
|
||||
#include "WebGLTransformFeedback.h"
|
||||
|
||||
#include "GLContext.h"
|
||||
|
||||
#include "mozilla/dom/WebGL2RenderingContextBinding.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
WebGLTransformFeedback::WebGLTransformFeedback(WebGLContext* context)
|
||||
: WebGLBindableName()
|
||||
, WebGLContextBoundObject(context)
|
||||
{
|
||||
SetIsDOMBinding();
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
WebGLTransformFeedback::~WebGLTransformFeedback()
|
||||
{}
|
||||
|
||||
void
|
||||
WebGLTransformFeedback::Delete()
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
}
|
||||
|
||||
WebGLContext*
|
||||
WebGLTransformFeedback::GetParentObject() const
|
||||
{
|
||||
MOZ_CRASH("Not Implemented.");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
JSObject*
|
||||
WebGLTransformFeedback::WrapObject(JSContext* cx)
|
||||
{
|
||||
return dom::WebGLTransformFeedbackBinding::Wrap(cx, this);
|
||||
}
|
||||
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(WebGLTransformFeedback)
|
||||
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(WebGLTransformFeedback, AddRef)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(WebGLTransformFeedback, Release)
|
48
dom/canvas/WebGLTransformFeedback.h
Normal file
48
dom/canvas/WebGLTransformFeedback.h
Normal file
@ -0,0 +1,48 @@
|
||||
/* -*- 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 WEBGLTRANSFORMFEEDBACK_H_
|
||||
#define WEBGLTRANSFORMFEEDBACK_H_
|
||||
|
||||
#include "WebGLBindableName.h"
|
||||
#include "WebGLObjectModel.h"
|
||||
|
||||
#include "nsWrapperCache.h"
|
||||
|
||||
#include "mozilla/LinkedList.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class WebGLTransformFeedback MOZ_FINAL
|
||||
: public WebGLBindableName
|
||||
, public nsWrapperCache
|
||||
, public WebGLRefCountedObject<WebGLTransformFeedback>
|
||||
, public LinkedListElement<WebGLTransformFeedback>
|
||||
, public WebGLContextBoundObject
|
||||
{
|
||||
friend class WebGLContext;
|
||||
|
||||
public:
|
||||
|
||||
WebGLTransformFeedback(WebGLContext* context);
|
||||
|
||||
void Delete();
|
||||
WebGLContext* GetParentObject() const;
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// IMPLEMENT NS
|
||||
virtual JSObject* WrapObject(JSContext* cx) MOZ_OVERRIDE;
|
||||
|
||||
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(WebGLTransformFeedback)
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(WebGLTransformFeedback)
|
||||
|
||||
private:
|
||||
|
||||
~WebGLTransformFeedback();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // !WEBGLTRANSFORMFEEDBACK_H_
|
@ -40,6 +40,18 @@ UNIFIED_SOURCES += [
|
||||
'MurmurHash3.cpp',
|
||||
'WebGL1Context.cpp',
|
||||
'WebGL2Context.cpp',
|
||||
'WebGL2ContextBuffers.cpp',
|
||||
'WebGL2ContextDraw.cpp',
|
||||
'WebGL2ContextFramebuffers.cpp',
|
||||
'WebGL2ContextMRTs.cpp',
|
||||
'WebGL2ContextPrograms.cpp',
|
||||
'WebGL2ContextQueries.cpp',
|
||||
'WebGL2ContextSamplers.cpp',
|
||||
'WebGL2ContextSync.cpp',
|
||||
'WebGL2ContextTextures.cpp',
|
||||
'WebGL2ContextTransformFeedback.cpp',
|
||||
'WebGL2ContextUniforms.cpp',
|
||||
'WebGL2ContextVAOs.cpp',
|
||||
'WebGLActiveInfo.cpp',
|
||||
'WebGLBindableName.cpp',
|
||||
'WebGLBuffer.cpp',
|
||||
@ -89,10 +101,13 @@ UNIFIED_SOURCES += [
|
||||
'WebGLProgram.cpp',
|
||||
'WebGLQuery.cpp',
|
||||
'WebGLRenderbuffer.cpp',
|
||||
'WebGLSampler.cpp',
|
||||
'WebGLShader.cpp',
|
||||
'WebGLShaderPrecisionFormat.cpp',
|
||||
'WebGLSync.cpp',
|
||||
'WebGLTexelConversions.cpp',
|
||||
'WebGLTexture.cpp',
|
||||
'WebGLTransformFeedback.cpp',
|
||||
'WebGLUniformLocation.cpp',
|
||||
'WebGLVertexArray.cpp',
|
||||
'WebGLVertexArrayFake.cpp',
|
||||
|
@ -3,129 +3,465 @@
|
||||
* 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/.
|
||||
*
|
||||
* The source for this IDL is found at https://www.khronos.org/registry/webgl/specs/latest/2.0
|
||||
* This IDL depends on WebGLRenderingContext.webidl
|
||||
*/
|
||||
|
||||
typedef long long GLint64; // Should this be int64?
|
||||
typedef unsigned long long GLuint64; // Should this be uint64?
|
||||
|
||||
[Pref="webgl.enable-prototype-webgl2"]
|
||||
interface WebGLQuery {
|
||||
};
|
||||
|
||||
[Pref="webgl.enable-prototype-webgl2"]
|
||||
interface WebGL2RenderingContext : WebGLRenderingContext {
|
||||
|
||||
/* depth textures */
|
||||
const GLenum UNSIGNED_INT_24_8 = 0x84FA;
|
||||
|
||||
|
||||
/* draw buffers */
|
||||
const GLenum COLOR_ATTACHMENT1 = 0x8CE1;
|
||||
const GLenum COLOR_ATTACHMENT2 = 0x8CE2;
|
||||
const GLenum COLOR_ATTACHMENT3 = 0x8CE3;
|
||||
const GLenum COLOR_ATTACHMENT4 = 0x8CE4;
|
||||
const GLenum COLOR_ATTACHMENT5 = 0x8CE5;
|
||||
const GLenum COLOR_ATTACHMENT6 = 0x8CE6;
|
||||
const GLenum COLOR_ATTACHMENT7 = 0x8CE7;
|
||||
const GLenum COLOR_ATTACHMENT8 = 0x8CE8;
|
||||
const GLenum COLOR_ATTACHMENT9 = 0x8CE9;
|
||||
const GLenum COLOR_ATTACHMENT10 = 0x8CEA;
|
||||
const GLenum COLOR_ATTACHMENT11 = 0x8CEB;
|
||||
const GLenum COLOR_ATTACHMENT12 = 0x8CEC;
|
||||
const GLenum COLOR_ATTACHMENT13 = 0x8CED;
|
||||
const GLenum COLOR_ATTACHMENT14 = 0x8CEE;
|
||||
const GLenum COLOR_ATTACHMENT15 = 0x8CEF;
|
||||
|
||||
const GLenum DRAW_BUFFER0 = 0x8825;
|
||||
const GLenum DRAW_BUFFER1 = 0x8826;
|
||||
const GLenum DRAW_BUFFER2 = 0x8827;
|
||||
const GLenum DRAW_BUFFER3 = 0x8828;
|
||||
const GLenum DRAW_BUFFER4 = 0x8829;
|
||||
const GLenum DRAW_BUFFER5 = 0x882A;
|
||||
const GLenum DRAW_BUFFER6 = 0x882B;
|
||||
const GLenum DRAW_BUFFER7 = 0x882C;
|
||||
const GLenum DRAW_BUFFER8 = 0x882D;
|
||||
const GLenum DRAW_BUFFER9 = 0x882E;
|
||||
const GLenum DRAW_BUFFER10 = 0x882F;
|
||||
const GLenum DRAW_BUFFER11 = 0x8830;
|
||||
const GLenum DRAW_BUFFER12 = 0x8831;
|
||||
const GLenum DRAW_BUFFER13 = 0x8832;
|
||||
const GLenum DRAW_BUFFER14 = 0x8833;
|
||||
const GLenum DRAW_BUFFER15 = 0x8834;
|
||||
|
||||
const GLenum MAX_COLOR_ATTACHMENTS = 0x8CDF;
|
||||
const GLenum MAX_DRAW_BUFFERS = 0x8824;
|
||||
|
||||
void drawBuffers(sequence<GLenum> buffers);
|
||||
|
||||
|
||||
/* draw instanced */
|
||||
void drawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
|
||||
void drawElementsInstanced(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei primcount);
|
||||
|
||||
|
||||
/* instanced array */
|
||||
const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE;
|
||||
|
||||
void vertexAttribDivisor(GLuint index, GLuint divisor);
|
||||
|
||||
|
||||
/* blend equations */
|
||||
const GLenum MIN = 0x8007;
|
||||
const GLenum MAX = 0x8008;
|
||||
|
||||
|
||||
/* transform feedback */
|
||||
const GLenum RASTERIZER_DISCARD = 0x8C89;
|
||||
const GLenum TRANSFORM_FEEDBACK_BUFFER = 0x8C8E;
|
||||
const GLenum TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F;
|
||||
const GLenum TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84;
|
||||
const GLenum TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85;
|
||||
const GLenum MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B;
|
||||
|
||||
|
||||
/* query objects */
|
||||
const GLenum CURRENT_QUERY = 0x8865;
|
||||
const GLenum QUERY_RESULT = 0x8866;
|
||||
const GLenum QUERY_RESULT_AVAILABLE = 0x8867;
|
||||
|
||||
void beginQuery(GLenum target, WebGLQuery? queryObject);
|
||||
WebGLQuery? createQuery();
|
||||
void deleteQuery(WebGLQuery? queryObject);
|
||||
void endQuery(GLenum target);
|
||||
WebGLQuery? getQuery(GLenum target, GLenum pname);
|
||||
any getQueryObject(WebGLQuery? queryObject, GLenum pname);
|
||||
[WebGLHandlesContextLoss] GLboolean isQuery(WebGLQuery? queryObject);
|
||||
|
||||
|
||||
/* occlusion queries */
|
||||
const GLenum ANY_SAMPLES_PASSED = 0x8C2F;
|
||||
const GLenum ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A;
|
||||
|
||||
|
||||
/* transform feedback queries */
|
||||
const GLenum TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88;
|
||||
|
||||
|
||||
/* buffer objects */
|
||||
void bindBufferBase(GLenum target, GLuint index, WebGLBuffer? buffer);
|
||||
void bindBufferRange(GLenum target, GLuint index, WebGLBuffer? buffer,
|
||||
GLintptr offset, GLsizeiptr size);
|
||||
|
||||
|
||||
/* standart derivatives */
|
||||
const GLenum FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B;
|
||||
|
||||
|
||||
/* state requests */
|
||||
any getParameterIndexed(GLenum pname, GLuint index);
|
||||
|
||||
|
||||
/* vertex array objects */
|
||||
const GLenum VERTEX_ARRAY_BINDING = 0x85B5;
|
||||
|
||||
void bindVertexArray(WebGLVertexArray? arrayObject);
|
||||
WebGLVertexArray? createVertexArray();
|
||||
void deleteVertexArray(WebGLVertexArray? arrayObject);
|
||||
[WebGLHandlesContextLoss] GLboolean isVertexArray(WebGLVertexArray? arrayObject);
|
||||
|
||||
interface WebGLSampler {
|
||||
};
|
||||
|
||||
[Pref="webgl.enable-prototype-webgl2"]
|
||||
interface WebGLSync {
|
||||
};
|
||||
|
||||
[Pref="webgl.enable-prototype-webgl2"]
|
||||
interface WebGLTransformFeedback {
|
||||
};
|
||||
|
||||
/*
|
||||
[Pref="webgl.enable-prototype-webgl2"]
|
||||
interface WebGLVertexArrayObject {
|
||||
};
|
||||
*/
|
||||
|
||||
[Pref="webgl.enable-prototype-webgl2"]
|
||||
interface WebGL2RenderingContext : WebGLRenderingContext
|
||||
{
|
||||
const GLenum READ_BUFFER = 0x0C02;
|
||||
const GLenum UNPACK_ROW_LENGTH = 0x0CF2;
|
||||
const GLenum UNPACK_SKIP_ROWS = 0x0CF3;
|
||||
const GLenum UNPACK_SKIP_PIXELS = 0x0CF4;
|
||||
const GLenum PACK_ROW_LENGTH = 0x0D02;
|
||||
const GLenum PACK_SKIP_ROWS = 0x0D03;
|
||||
const GLenum PACK_SKIP_PIXELS = 0x0D04;
|
||||
const GLenum COLOR = 0x1800;
|
||||
const GLenum DEPTH = 0x1801;
|
||||
const GLenum STENCIL = 0x1802;
|
||||
const GLenum RED = 0x1903;
|
||||
const GLenum RGB8 = 0x8051;
|
||||
const GLenum RGBA8 = 0x8058;
|
||||
const GLenum RGB10_A2 = 0x8059;
|
||||
const GLenum TEXTURE_BINDING_3D = 0x806A;
|
||||
const GLenum UNPACK_SKIP_IMAGES = 0x806D;
|
||||
const GLenum UNPACK_IMAGE_HEIGHT = 0x806E;
|
||||
const GLenum TEXTURE_3D = 0x806F;
|
||||
const GLenum TEXTURE_WRAP_R = 0x8072;
|
||||
const GLenum MAX_3D_TEXTURE_SIZE = 0x8073;
|
||||
const GLenum UNSIGNED_INT_2_10_10_10_REV = 0x8368;
|
||||
const GLenum MAX_ELEMENTS_VERTICES = 0x80E8;
|
||||
const GLenum MAX_ELEMENTS_INDICES = 0x80E9;
|
||||
const GLenum TEXTURE_MIN_LOD = 0x813A;
|
||||
const GLenum TEXTURE_MAX_LOD = 0x813B;
|
||||
const GLenum TEXTURE_BASE_LEVEL = 0x813C;
|
||||
const GLenum TEXTURE_MAX_LEVEL = 0x813D;
|
||||
const GLenum MIN = 0x8007;
|
||||
const GLenum MAX = 0x8008;
|
||||
const GLenum DEPTH_COMPONENT24 = 0x81A6;
|
||||
const GLenum MAX_TEXTURE_LOD_BIAS = 0x84FD;
|
||||
const GLenum TEXTURE_COMPARE_MODE = 0x884C;
|
||||
const GLenum TEXTURE_COMPARE_FUNC = 0x884D;
|
||||
const GLenum CURRENT_QUERY = 0x8865;
|
||||
const GLenum QUERY_RESULT = 0x8866;
|
||||
const GLenum QUERY_RESULT_AVAILABLE = 0x8867;
|
||||
const GLenum STREAM_READ = 0x88E1;
|
||||
const GLenum STREAM_COPY = 0x88E2;
|
||||
const GLenum STATIC_READ = 0x88E5;
|
||||
const GLenum STATIC_COPY = 0x88E6;
|
||||
const GLenum DYNAMIC_READ = 0x88E9;
|
||||
const GLenum DYNAMIC_COPY = 0x88EA;
|
||||
const GLenum MAX_DRAW_BUFFERS = 0x8824;
|
||||
const GLenum DRAW_BUFFER0 = 0x8825;
|
||||
const GLenum DRAW_BUFFER1 = 0x8826;
|
||||
const GLenum DRAW_BUFFER2 = 0x8827;
|
||||
const GLenum DRAW_BUFFER3 = 0x8828;
|
||||
const GLenum DRAW_BUFFER4 = 0x8829;
|
||||
const GLenum DRAW_BUFFER5 = 0x882A;
|
||||
const GLenum DRAW_BUFFER6 = 0x882B;
|
||||
const GLenum DRAW_BUFFER7 = 0x882C;
|
||||
const GLenum DRAW_BUFFER8 = 0x882D;
|
||||
const GLenum DRAW_BUFFER9 = 0x882E;
|
||||
const GLenum DRAW_BUFFER10 = 0x882F;
|
||||
const GLenum DRAW_BUFFER11 = 0x8830;
|
||||
const GLenum DRAW_BUFFER12 = 0x8831;
|
||||
const GLenum DRAW_BUFFER13 = 0x8832;
|
||||
const GLenum DRAW_BUFFER14 = 0x8833;
|
||||
const GLenum DRAW_BUFFER15 = 0x8834;
|
||||
const GLenum MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49;
|
||||
const GLenum MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A;
|
||||
const GLenum SAMPLER_3D = 0x8B5F;
|
||||
const GLenum SAMPLER_2D_SHADOW = 0x8B62;
|
||||
const GLenum FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B;
|
||||
const GLenum PIXEL_PACK_BUFFER = 0x88EB;
|
||||
const GLenum PIXEL_UNPACK_BUFFER = 0x88EC;
|
||||
const GLenum PIXEL_PACK_BUFFER_BINDING = 0x88ED;
|
||||
const GLenum PIXEL_UNPACK_BUFFER_BINDING = 0x88EF;
|
||||
const GLenum FLOAT_MAT2x3 = 0x8B65;
|
||||
const GLenum FLOAT_MAT2x4 = 0x8B66;
|
||||
const GLenum FLOAT_MAT3x2 = 0x8B67;
|
||||
const GLenum FLOAT_MAT3x4 = 0x8B68;
|
||||
const GLenum FLOAT_MAT4x2 = 0x8B69;
|
||||
const GLenum FLOAT_MAT4x3 = 0x8B6A;
|
||||
const GLenum SRGB = 0x8C40;
|
||||
const GLenum SRGB8 = 0x8C41;
|
||||
const GLenum SRGB8_ALPHA8 = 0x8C43;
|
||||
const GLenum COMPARE_REF_TO_TEXTURE = 0x884E;
|
||||
const GLenum RGBA32F = 0x8814;
|
||||
const GLenum RGB32F = 0x8815;
|
||||
const GLenum RGBA16F = 0x881A;
|
||||
const GLenum RGB16F = 0x881B;
|
||||
const GLenum VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD;
|
||||
const GLenum MAX_ARRAY_TEXTURE_LAYERS = 0x88FF;
|
||||
const GLenum MIN_PROGRAM_TEXEL_OFFSET = 0x8904;
|
||||
const GLenum MAX_PROGRAM_TEXEL_OFFSET = 0x8905;
|
||||
const GLenum MAX_VARYING_COMPONENTS = 0x8B4B;
|
||||
const GLenum TEXTURE_2D_ARRAY = 0x8C1A;
|
||||
const GLenum TEXTURE_BINDING_2D_ARRAY = 0x8C1D;
|
||||
const GLenum R11F_G11F_B10F = 0x8C3A;
|
||||
const GLenum UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B;
|
||||
const GLenum RGB9_E5 = 0x8C3D;
|
||||
const GLenum UNSIGNED_INT_5_9_9_9_REV = 0x8C3E;
|
||||
const GLenum TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F;
|
||||
const GLenum MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80;
|
||||
const GLenum TRANSFORM_FEEDBACK_VARYINGS = 0x8C83;
|
||||
const GLenum TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84;
|
||||
const GLenum TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85;
|
||||
const GLenum TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88;
|
||||
const GLenum RASTERIZER_DISCARD = 0x8C89;
|
||||
const GLenum MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A;
|
||||
const GLenum MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B;
|
||||
const GLenum INTERLEAVED_ATTRIBS = 0x8C8C;
|
||||
const GLenum SEPARATE_ATTRIBS = 0x8C8D;
|
||||
const GLenum TRANSFORM_FEEDBACK_BUFFER = 0x8C8E;
|
||||
const GLenum TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F;
|
||||
const GLenum RGBA32UI = 0x8D70;
|
||||
const GLenum RGB32UI = 0x8D71;
|
||||
const GLenum RGBA16UI = 0x8D76;
|
||||
const GLenum RGB16UI = 0x8D77;
|
||||
const GLenum RGBA8UI = 0x8D7C;
|
||||
const GLenum RGB8UI = 0x8D7D;
|
||||
const GLenum RGBA32I = 0x8D82;
|
||||
const GLenum RGB32I = 0x8D83;
|
||||
const GLenum RGBA16I = 0x8D88;
|
||||
const GLenum RGB16I = 0x8D89;
|
||||
const GLenum RGBA8I = 0x8D8E;
|
||||
const GLenum RGB8I = 0x8D8F;
|
||||
const GLenum RED_INTEGER = 0x8D94;
|
||||
const GLenum RGB_INTEGER = 0x8D98;
|
||||
const GLenum RGBA_INTEGER = 0x8D99;
|
||||
const GLenum SAMPLER_2D_ARRAY = 0x8DC1;
|
||||
const GLenum SAMPLER_2D_ARRAY_SHADOW = 0x8DC4;
|
||||
const GLenum SAMPLER_CUBE_SHADOW = 0x8DC5;
|
||||
const GLenum UNSIGNED_INT_VEC2 = 0x8DC6;
|
||||
const GLenum UNSIGNED_INT_VEC3 = 0x8DC7;
|
||||
const GLenum UNSIGNED_INT_VEC4 = 0x8DC8;
|
||||
const GLenum INT_SAMPLER_2D = 0x8DCA;
|
||||
const GLenum INT_SAMPLER_3D = 0x8DCB;
|
||||
const GLenum INT_SAMPLER_CUBE = 0x8DCC;
|
||||
const GLenum INT_SAMPLER_2D_ARRAY = 0x8DCF;
|
||||
const GLenum UNSIGNED_INT_SAMPLER_2D = 0x8DD2;
|
||||
const GLenum UNSIGNED_INT_SAMPLER_3D = 0x8DD3;
|
||||
const GLenum UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4;
|
||||
const GLenum UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7;
|
||||
const GLenum DEPTH_COMPONENT32F = 0x8CAC;
|
||||
const GLenum DEPTH32F_STENCIL8 = 0x8CAD;
|
||||
const GLenum FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD;
|
||||
const GLenum FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210;
|
||||
const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211;
|
||||
const GLenum FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212;
|
||||
const GLenum FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213;
|
||||
const GLenum FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214;
|
||||
const GLenum FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215;
|
||||
const GLenum FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216;
|
||||
const GLenum FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217;
|
||||
const GLenum FRAMEBUFFER_DEFAULT = 0x8218;
|
||||
const GLenum DEPTH_STENCIL_ATTACHMENT = 0x821A;
|
||||
const GLenum DEPTH_STENCIL = 0x84F9;
|
||||
const GLenum UNSIGNED_INT_24_8 = 0x84FA;
|
||||
const GLenum DEPTH24_STENCIL8 = 0x88F0;
|
||||
const GLenum UNSIGNED_NORMALIZED = 0x8C17;
|
||||
const GLenum DRAW_FRAMEBUFFER_BINDING = 0x8CA6; /* Same as FRAMEBUFFER_BINDING */
|
||||
const GLenum READ_FRAMEBUFFER = 0x8CA8;
|
||||
const GLenum DRAW_FRAMEBUFFER = 0x8CA9;
|
||||
const GLenum READ_FRAMEBUFFER_BINDING = 0x8CAA;
|
||||
const GLenum RENDERBUFFER_SAMPLES = 0x8CAB;
|
||||
const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4;
|
||||
const GLenum MAX_COLOR_ATTACHMENTS = 0x8CDF;
|
||||
const GLenum COLOR_ATTACHMENT1 = 0x8CE1;
|
||||
const GLenum COLOR_ATTACHMENT2 = 0x8CE2;
|
||||
const GLenum COLOR_ATTACHMENT3 = 0x8CE3;
|
||||
const GLenum COLOR_ATTACHMENT4 = 0x8CE4;
|
||||
const GLenum COLOR_ATTACHMENT5 = 0x8CE5;
|
||||
const GLenum COLOR_ATTACHMENT6 = 0x8CE6;
|
||||
const GLenum COLOR_ATTACHMENT7 = 0x8CE7;
|
||||
const GLenum COLOR_ATTACHMENT8 = 0x8CE8;
|
||||
const GLenum COLOR_ATTACHMENT9 = 0x8CE9;
|
||||
const GLenum COLOR_ATTACHMENT10 = 0x8CEA;
|
||||
const GLenum COLOR_ATTACHMENT11 = 0x8CEB;
|
||||
const GLenum COLOR_ATTACHMENT12 = 0x8CEC;
|
||||
const GLenum COLOR_ATTACHMENT13 = 0x8CED;
|
||||
const GLenum COLOR_ATTACHMENT14 = 0x8CEE;
|
||||
const GLenum COLOR_ATTACHMENT15 = 0x8CEF;
|
||||
const GLenum FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56;
|
||||
const GLenum MAX_SAMPLES = 0x8D57;
|
||||
const GLenum HALF_FLOAT = 0x140B;
|
||||
const GLenum RG = 0x8227;
|
||||
const GLenum RG_INTEGER = 0x8228;
|
||||
const GLenum R8 = 0x8229;
|
||||
const GLenum RG8 = 0x822B;
|
||||
const GLenum R16F = 0x822D;
|
||||
const GLenum R32F = 0x822E;
|
||||
const GLenum RG16F = 0x822F;
|
||||
const GLenum RG32F = 0x8230;
|
||||
const GLenum R8I = 0x8231;
|
||||
const GLenum R8UI = 0x8232;
|
||||
const GLenum R16I = 0x8233;
|
||||
const GLenum R16UI = 0x8234;
|
||||
const GLenum R32I = 0x8235;
|
||||
const GLenum R32UI = 0x8236;
|
||||
const GLenum RG8I = 0x8237;
|
||||
const GLenum RG8UI = 0x8238;
|
||||
const GLenum RG16I = 0x8239;
|
||||
const GLenum RG16UI = 0x823A;
|
||||
const GLenum RG32I = 0x823B;
|
||||
const GLenum RG32UI = 0x823C;
|
||||
const GLenum VERTEX_ARRAY_BINDING = 0x85B5;
|
||||
const GLenum R8_SNORM = 0x8F94;
|
||||
const GLenum RG8_SNORM = 0x8F95;
|
||||
const GLenum RGB8_SNORM = 0x8F96;
|
||||
const GLenum RGBA8_SNORM = 0x8F97;
|
||||
const GLenum SIGNED_NORMALIZED = 0x8F9C;
|
||||
const GLenum PRIMITIVE_RESTART_FIXED_INDEX = 0x8D69;
|
||||
const GLenum COPY_READ_BUFFER = 0x8F36;
|
||||
const GLenum COPY_WRITE_BUFFER = 0x8F37;
|
||||
const GLenum COPY_READ_BUFFER_BINDING = 0x8F36; /* Same as COPY_READ_BUFFER */
|
||||
const GLenum COPY_WRITE_BUFFER_BINDING = 0x8F37; /* Same as COPY_WRITE_BUFFER */
|
||||
const GLenum UNIFORM_BUFFER = 0x8A11;
|
||||
const GLenum UNIFORM_BUFFER_BINDING = 0x8A28;
|
||||
const GLenum UNIFORM_BUFFER_START = 0x8A29;
|
||||
const GLenum UNIFORM_BUFFER_SIZE = 0x8A2A;
|
||||
const GLenum MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B;
|
||||
const GLenum MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D;
|
||||
const GLenum MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E;
|
||||
const GLenum MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F;
|
||||
const GLenum MAX_UNIFORM_BLOCK_SIZE = 0x8A30;
|
||||
const GLenum MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31;
|
||||
const GLenum MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33;
|
||||
const GLenum UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34;
|
||||
const GLenum ACTIVE_UNIFORM_BLOCKS = 0x8A36;
|
||||
const GLenum UNIFORM_TYPE = 0x8A37;
|
||||
const GLenum UNIFORM_SIZE = 0x8A38;
|
||||
const GLenum UNIFORM_BLOCK_INDEX = 0x8A3A;
|
||||
const GLenum UNIFORM_OFFSET = 0x8A3B;
|
||||
const GLenum UNIFORM_ARRAY_STRIDE = 0x8A3C;
|
||||
const GLenum UNIFORM_MATRIX_STRIDE = 0x8A3D;
|
||||
const GLenum UNIFORM_IS_ROW_MAJOR = 0x8A3E;
|
||||
const GLenum UNIFORM_BLOCK_BINDING = 0x8A3F;
|
||||
const GLenum UNIFORM_BLOCK_DATA_SIZE = 0x8A40;
|
||||
const GLenum UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42;
|
||||
const GLenum UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43;
|
||||
const GLenum UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44;
|
||||
const GLenum UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46;
|
||||
const GLenum INVALID_INDEX = 0xFFFFFFFF;
|
||||
const GLenum MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122;
|
||||
const GLenum MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125;
|
||||
const GLenum MAX_SERVER_WAIT_TIMEOUT = 0x9111;
|
||||
const GLenum OBJECT_TYPE = 0x9112;
|
||||
const GLenum SYNC_CONDITION = 0x9113;
|
||||
const GLenum SYNC_STATUS = 0x9114;
|
||||
const GLenum SYNC_FLAGS = 0x9115;
|
||||
const GLenum SYNC_FENCE = 0x9116;
|
||||
const GLenum SYNC_GPU_COMMANDS_COMPLETE = 0x9117;
|
||||
const GLenum UNSIGNALED = 0x9118;
|
||||
const GLenum SIGNALED = 0x9119;
|
||||
const GLenum ALREADY_SIGNALED = 0x911A;
|
||||
const GLenum TIMEOUT_EXPIRED = 0x911B;
|
||||
const GLenum CONDITION_SATISFIED = 0x911C;
|
||||
const GLenum WAIT_FAILED = 0x911D;
|
||||
const GLenum SYNC_FLUSH_COMMANDS_BIT = 0x00000001;
|
||||
const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE;
|
||||
const GLenum ANY_SAMPLES_PASSED = 0x8C2F;
|
||||
const GLenum ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A;
|
||||
const GLenum SAMPLER_BINDING = 0x8919;
|
||||
const GLenum RGB10_A2UI = 0x906F;
|
||||
const GLenum TEXTURE_SWIZZLE_R = 0x8E42;
|
||||
const GLenum TEXTURE_SWIZZLE_G = 0x8E43;
|
||||
const GLenum TEXTURE_SWIZZLE_B = 0x8E44;
|
||||
const GLenum TEXTURE_SWIZZLE_A = 0x8E45;
|
||||
const GLenum GREEN = 0x1904;
|
||||
const GLenum BLUE = 0x1905;
|
||||
const GLenum INT_2_10_10_10_REV = 0x8D9F;
|
||||
const GLenum TRANSFORM_FEEDBACK = 0x8E22;
|
||||
const GLenum TRANSFORM_FEEDBACK_PAUSED = 0x8E23;
|
||||
const GLenum TRANSFORM_FEEDBACK_ACTIVE = 0x8E24;
|
||||
const GLenum TRANSFORM_FEEDBACK_BINDING = 0x8E25;
|
||||
const GLenum COMPRESSED_R11_EAC = 0x9270;
|
||||
const GLenum COMPRESSED_SIGNED_R11_EAC = 0x9271;
|
||||
const GLenum COMPRESSED_RG11_EAC = 0x9272;
|
||||
const GLenum COMPRESSED_SIGNED_RG11_EAC = 0x9273;
|
||||
const GLenum COMPRESSED_RGB8_ETC2 = 0x9274;
|
||||
const GLenum COMPRESSED_SRGB8_ETC2 = 0x9275;
|
||||
const GLenum COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276;
|
||||
const GLenum COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277;
|
||||
const GLenum COMPRESSED_RGBA8_ETC2_EAC = 0x9278;
|
||||
const GLenum COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279;
|
||||
const GLenum TEXTURE_IMMUTABLE_FORMAT = 0x912F;
|
||||
const GLenum MAX_ELEMENT_INDEX = 0x8D6B;
|
||||
const GLenum NUM_SAMPLE_COUNTS = 0x9380;
|
||||
const GLenum TEXTURE_IMMUTABLE_LEVELS = 0x82DF;
|
||||
|
||||
const GLint64 TIMEOUT_IGNORED = -1;
|
||||
|
||||
/* Buffer objects */
|
||||
void copyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset,
|
||||
GLintptr writeOffset, GLsizeiptr size);
|
||||
void getBufferSubData(GLenum target, GLintptr offset, ArrayBuffer returnedData);
|
||||
void getBufferSubData(GLenum target, GLintptr offset, ArrayBufferView returnedData);
|
||||
|
||||
/* Framebuffer objects */
|
||||
void blitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0,
|
||||
GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
void framebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
|
||||
any getInternalformatParameter(GLenum target, GLenum internalformat, GLenum pname);
|
||||
void invalidateFramebuffer(GLenum target, sequence<GLenum> attachments);
|
||||
void invalidateSubFramebuffer (GLenum target, sequence<GLenum> attachments,
|
||||
GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
void readBuffer(GLenum src);
|
||||
|
||||
/* Renderbuffer objects */
|
||||
void renderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
|
||||
/* Texture objects */
|
||||
void texStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
void texStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height,
|
||||
GLsizei depth);
|
||||
[Throws] void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
|
||||
GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type,
|
||||
ArrayBufferView? pixels);
|
||||
[Throws] void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
|
||||
GLenum format, GLenum type, ImageData? data);
|
||||
[Throws] void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
|
||||
GLenum format, GLenum type, HTMLImageElement image);
|
||||
[Throws] void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
|
||||
GLenum format, GLenum type, HTMLCanvasElement canvas);
|
||||
[Throws] void texSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
|
||||
GLenum format, GLenum type, HTMLVideoElement video);
|
||||
void copyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
|
||||
GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
void compressedTexImage3D(GLenum target, GLint level, GLenum internalformat,
|
||||
GLsizei width, GLsizei height, GLsizei depth,
|
||||
GLint border, GLsizei imageSize, ArrayBufferView data);
|
||||
void compressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset,
|
||||
GLsizei width, GLsizei height, GLsizei depth,
|
||||
GLenum format, GLsizei imageSize, ArrayBufferView data);
|
||||
|
||||
/* Programs and shaders */
|
||||
[WebGLHandlesContextLoss] GLint getFragDataLocation(WebGLProgram? program, DOMString name);
|
||||
|
||||
/* Uniforms and attributes */
|
||||
void uniform1ui(WebGLUniformLocation? location, GLuint v0);
|
||||
void uniform2ui(WebGLUniformLocation? location, GLuint v0, GLuint v1);
|
||||
void uniform3ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2);
|
||||
void uniform4ui(WebGLUniformLocation? location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
|
||||
void uniform1uiv(WebGLUniformLocation? location, sequence<GLuint> value);
|
||||
void uniform2uiv(WebGLUniformLocation? location, sequence<GLuint> value);
|
||||
void uniform3uiv(WebGLUniformLocation? location, sequence<GLuint> value);
|
||||
void uniform4uiv(WebGLUniformLocation? location, sequence<GLuint> value);
|
||||
void uniformMatrix2x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array value);
|
||||
void uniformMatrix2x3fv(WebGLUniformLocation? location, GLboolean transpose, sequence<GLfloat> value);
|
||||
void uniformMatrix3x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array value);
|
||||
void uniformMatrix3x2fv(WebGLUniformLocation? location, GLboolean transpose, sequence<GLfloat> value);
|
||||
void uniformMatrix2x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array value);
|
||||
void uniformMatrix2x4fv(WebGLUniformLocation? location, GLboolean transpose, sequence<GLfloat> value);
|
||||
void uniformMatrix4x2fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array value);
|
||||
void uniformMatrix4x2fv(WebGLUniformLocation? location, GLboolean transpose, sequence<GLfloat> value);
|
||||
void uniformMatrix3x4fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array value);
|
||||
void uniformMatrix3x4fv(WebGLUniformLocation? location, GLboolean transpose, sequence<GLfloat> value);
|
||||
void uniformMatrix4x3fv(WebGLUniformLocation? location, GLboolean transpose, Float32Array value);
|
||||
void uniformMatrix4x3fv(WebGLUniformLocation? location, GLboolean transpose, sequence<GLfloat> value);
|
||||
void vertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w);
|
||||
void vertexAttribI4iv(GLuint index, sequence<GLint> v);
|
||||
void vertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
|
||||
void vertexAttribI4uiv(GLuint index, sequence<GLuint> v);
|
||||
void vertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset);
|
||||
|
||||
/* Writing to the drawing buffer */
|
||||
void vertexAttribDivisor(GLuint index, GLuint divisor);
|
||||
void drawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount);
|
||||
void drawElementsInstanced(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei instanceCount);
|
||||
void drawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLintptr offset);
|
||||
|
||||
/* Multiple Render Targets */
|
||||
void drawBuffers(sequence<GLenum> buffers);
|
||||
void clearBufferiv(GLenum buffer, GLint drawbuffer, Int32Array value);
|
||||
void clearBufferiv(GLenum buffer, GLint drawbuffer, sequence<GLint> value);
|
||||
void clearBufferuiv(GLenum buffer, GLint drawbuffer, Uint32Array value);
|
||||
void clearBufferuiv(GLenum buffer, GLint drawbuffer, sequence<GLuint> value);
|
||||
void clearBufferfv(GLenum buffer, GLint drawbuffer, Float32Array value);
|
||||
void clearBufferfv(GLenum buffer, GLint drawbuffer, sequence<GLfloat> value);
|
||||
void clearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
|
||||
|
||||
/* Query Objects */
|
||||
WebGLQuery? createQuery();
|
||||
void deleteQuery(WebGLQuery? query);
|
||||
[WebGLHandlesContextLoss] GLboolean isQuery(WebGLQuery? query);
|
||||
void beginQuery(GLenum target, WebGLQuery? query);
|
||||
void endQuery(GLenum target);
|
||||
WebGLQuery? getQuery(GLenum target, GLenum pname);
|
||||
any getQueryParameter(WebGLQuery? query, GLenum pname);
|
||||
|
||||
/* Sampler Objects */
|
||||
WebGLSampler? createSampler();
|
||||
void deleteSampler(WebGLSampler? sampler);
|
||||
[WebGLHandlesContextLoss] GLboolean isSampler(WebGLSampler? sampler);
|
||||
void bindSampler(GLuint unit, WebGLSampler? sampler);
|
||||
void samplerParameteri(WebGLSampler? sampler, GLenum pname, GLint param);
|
||||
void samplerParameterf(WebGLSampler? sampler, GLenum pname, GLfloat param);
|
||||
any getSamplerParameter(WebGLSampler? sampler, GLenum pname);
|
||||
|
||||
/* Sync objects */
|
||||
WebGLSync? fenceSync(GLenum condition, GLbitfield flags);
|
||||
[WebGLHandlesContextLoss] GLboolean isSync(WebGLSync? sync);
|
||||
void deleteSync(WebGLSync? sync);
|
||||
GLenum clientWaitSync(WebGLSync? sync, GLbitfield flags, GLint64 timeout);
|
||||
void waitSync(WebGLSync? sync, GLbitfield flags, GLint64 timeout);
|
||||
any getSyncParameter(WebGLSync? sync, GLenum pname);
|
||||
|
||||
/* Transform Feedback */
|
||||
WebGLTransformFeedback? createTransformFeedback();
|
||||
void deleteTransformFeedback(WebGLTransformFeedback? tf);
|
||||
[WebGLHandlesContextLoss] GLboolean isTransformFeedback(WebGLTransformFeedback? tf);
|
||||
void bindTransformFeedback(GLenum target, GLuint id);
|
||||
void beginTransformFeedback(GLenum primitiveMode);
|
||||
void endTransformFeedback();
|
||||
void transformFeedbackVaryings(WebGLProgram? program, GLsizei count, sequence<DOMString> varyings, GLenum bufferMode);
|
||||
[NewObject] WebGLActiveInfo? getTransformFeedbackVarying(WebGLProgram? program, GLuint index);
|
||||
void pauseTransformFeedback();
|
||||
void resumeTransformFeedback();
|
||||
|
||||
/* Uniform Buffer Objects and Transform Feedback Buffers */
|
||||
void bindBufferBase(GLenum target, GLuint index, WebGLBuffer? buffer);
|
||||
void bindBufferRange(GLenum target, GLuint index, WebGLBuffer? buffer, GLintptr offset, GLsizeiptr size);
|
||||
any getIndexedParameter(GLenum target, GLuint index);
|
||||
sequence<GLuint>? getUniformIndices(WebGLProgram? program, sequence<DOMString> uniformNames);
|
||||
sequence<GLint>? getActiveUniforms(WebGLProgram? program, sequence<GLuint> uniformIndices, GLenum pname);
|
||||
GLuint getUniformBlockIndex(WebGLProgram? program, DOMString uniformBlockName);
|
||||
any getActiveUniformBlockParameter(WebGLProgram? program, GLuint uniformBlockIndex, GLenum pname);
|
||||
DOMString? getActiveUniformBlockName(WebGLProgram? program, GLuint uniformBlockIndex);
|
||||
void uniformBlockBinding(WebGLProgram? program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
|
||||
|
||||
/* Vertex Array Objects */
|
||||
/*
|
||||
WebGLVertexArrayObject? createVertexArray();
|
||||
void deleteVertexArray(WebGLVertexArrayObject? vertexArray);
|
||||
[WebGLHandlesContextLoss] GLboolean isVertexArray(WebGLVertexArrayObject? vertexArray);
|
||||
void bindVertexArray(WebGLVertexArrayObject? array);
|
||||
*/
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user