void
WebGLContext::CopyTexSubImage(uint8_t funcDims, GLenum rawTarget,
                              GLint level, GLint xOffset, GLint yOffset, GLint zOffset,
                              GLint x, GLint y, GLsizei width, GLsizei height)
{
    TexImageTarget target;
    WebGLTexture* tex;
    if (!ValidateTexImageTarget(this, funcDims, rawTarget, &target, &tex))
        return;

    tex->CopyTexSubImage(target, level, xOffset, yOffset, zOffset, x, y, width,
                         height);
}
void
WebGLContext::CompressedTexImage(uint8_t funcDims, GLenum rawTarget,
                                 GLint level, GLenum internalFormat, GLsizei width,
                                 GLsizei height, GLsizei depth, GLint border,
                                 const TexImageSource& src, const Maybe<GLsizei>& expectedImageSize)
{
    TexImageTarget target;
    WebGLTexture* tex;
    if (!ValidateTexImageTarget(this, funcDims, rawTarget, &target, &tex))
        return;

    tex->CompressedTexImage(target, level, internalFormat, width, height, depth,
                            border, src, expectedImageSize);
}
Ejemplo n.º 3
0
void
WebGLContext::CopyTexSubImage2D(GLenum rawTexImageTarget, GLint level, GLint xOffset,
                                GLint yOffset, GLint x, GLint y, GLsizei width,
                                GLsizei height)
{
    TexImageTarget texImageTarget;
    WebGLTexture* tex;
    if (!ValidateTexImageTarget(this, rawTexImageTarget, "copyTexSubImage2D",
                                &texImageTarget, &tex))
    {
        return;
    }

    tex->CopyTexSubImage2D(texImageTarget, level, xOffset, yOffset, x, y, width, height);
}
void
WebGLContext::TexImage(uint8_t funcDims, GLenum rawTarget,
                       GLint level, GLenum internalFormat, GLsizei width, GLsizei height,
                       GLsizei depth, GLint border, GLenum unpackFormat,
                       GLenum unpackType, const TexImageSource& src)
{
    TexImageTarget target;
    WebGLTexture* tex;
    if (!ValidateTexImageTarget(this, funcDims, rawTarget, &target, &tex))
        return;

    const webgl::PackingInfo pi = {unpackFormat, unpackType};
    tex->TexImage(target, level, internalFormat, width, height, depth, border,
                  pi, src);
}
void
WebGLContext::CopyTexImage2D(GLenum rawTarget, GLint level, GLenum internalFormat,
                             GLint x, GLint y, GLsizei width, GLsizei height,
                             GLint border)
{
    const FuncScope funcScope(*this, "copyTexImage2D");
    const uint8_t funcDims = 2;

    TexImageTarget target;
    WebGLTexture* tex;
    if (!ValidateTexImageTarget(this, funcDims, rawTarget, &target, &tex))
        return;

    tex->CopyTexImage2D(target, level, internalFormat, x, y, width, height, border);
}
void
WebGLContext::CompressedTexSubImage(uint8_t funcDims,
                                    GLenum rawTarget, GLint level, GLint xOffset,
                                    GLint yOffset, GLint zOffset, GLsizei width,
                                    GLsizei height, GLsizei depth, GLenum unpackFormat,
                                    const TexImageSource& src, const Maybe<GLsizei>& expectedImageSize)
{
    TexImageTarget target;
    WebGLTexture* tex;
    if (!ValidateTexImageTarget(this, funcDims, rawTarget, &target, &tex))
        return;

    tex->CompressedTexSubImage(target, level, xOffset, yOffset, zOffset, width,
                               height, depth, unpackFormat, src, expectedImageSize);
}
Ejemplo n.º 7
0
void
WebGLContext::CompressedTexImage2D(GLenum rawTexImageTarget, GLint level,
                                   GLenum internalFormat, GLsizei width, GLsizei height,
                                   GLint border, const dom::ArrayBufferView& view)
{
    TexImageTarget texImageTarget;
    WebGLTexture* tex;
    if (!ValidateTexImageTarget(this, rawTexImageTarget, "compressedTexImage2D",
                                &texImageTarget, &tex))
    {
        return;
    }

    tex->CompressedTexImage2D(texImageTarget, level, internalFormat, width, height,
                              border, view);
}
Ejemplo n.º 8
0
void
WebGLContext::CopyTexImage2D(GLenum rawTexImageTarget, GLint level, GLenum internalFormat,
                             GLint x, GLint y, GLsizei width, GLsizei height,
                             GLint border)
{
    TexImageTarget texImageTarget;
    WebGLTexture* tex;
    if (!ValidateTexImageTarget(this, rawTexImageTarget, "copyTexImage2D",
                                &texImageTarget, &tex))
    {
        return;
    }

    tex->CopyTexImage2D(texImageTarget, level, internalFormat, x, y, width, height,
                        border);
}
Ejemplo n.º 9
0
void
WebGLContext::TexSubImage2D(GLenum rawTexImageTarget, GLint level, GLint xOffset, GLint yOffset,
                            GLenum unpackFormat, GLenum unpackType, dom::ImageData* imageData,
                            ErrorResult& out_rv)
{
    TexImageTarget texImageTarget;
    WebGLTexture* tex;
    if (!ValidateTexImageTarget(this, rawTexImageTarget, "texSubImage2D", &texImageTarget,
                                &tex))
    {
        return;
    }

    tex->TexSubImage2D(texImageTarget, level, xOffset, yOffset, unpackFormat, unpackType,
                       imageData, &out_rv);
}
Ejemplo n.º 10
0
void
WebGLContext::TexImage2D(GLenum rawTexImageTarget, GLint level, GLenum internalFormat,
                         GLenum unpackFormat, GLenum unpackType, dom::Element* elem,
                         ErrorResult* const out_rv)
{
    TexImageTarget texImageTarget;
    WebGLTexture* tex;
    if (!ValidateTexImageTarget(this, rawTexImageTarget, "texImage2D", &texImageTarget,
                                &tex))
    {
        return;
    }

    tex->TexImage2D(texImageTarget, level, internalFormat, unpackFormat, unpackType, elem,
                    out_rv);
}
Ejemplo n.º 11
0
void
WebGLContext::CompressedTexSubImage2D(GLenum rawTexImageTarget, GLint level,
                                      GLint xOffset, GLint yOffset, GLsizei width,
                                      GLsizei height, GLenum unpackFormat,
                                      const dom::ArrayBufferView& view)
{
    TexImageTarget texImageTarget;
    WebGLTexture* tex;
    if (!ValidateTexImageTarget(this, rawTexImageTarget, "compressedTexSubImage2D",
                                &texImageTarget, &tex))
    {
        return;
    }

    tex->CompressedTexSubImage2D(texImageTarget, level, xOffset, yOffset, width, height,
                                 unpackFormat, view);
}
Ejemplo n.º 12
0
void
WebGLContext::TexSubImage2D(GLenum rawTexImageTarget, GLint level, GLint xOffset,
                            GLint yOffset, GLsizei width, GLsizei height,
                            GLenum unpackFormat, GLenum unpackType,
                            const dom::Nullable<dom::ArrayBufferView>& maybeView,
                            ErrorResult& out_rv)
{
    TexImageTarget texImageTarget;
    WebGLTexture* tex;
    if (!ValidateTexImageTarget(this, rawTexImageTarget, "texSubImage2D", &texImageTarget,
                                &tex))
    {
        return;
    }

    tex->TexSubImage2D(texImageTarget, level, xOffset, yOffset, width, height,
                       unpackFormat, unpackType, maybeView, &out_rv);
}