Ejemplo n.º 1
0
bool
WebGLContext::IsTexture(WebGLTexture* tex)
{
    if (IsContextLost())
        return false;

    if (!ValidateObjectAllowDeleted("isTexture", tex))
        return false;

    return tex->IsTexture();
}
Ejemplo n.º 2
0
bool
WebGL2Context::IsQuery(WebGLQuery* query)
{
    if (IsContextLost())
        return false;

    if (!query)
        return false;

    return (ValidateObjectAllowDeleted("isQuery", query) &&
            !query->IsDeleted() &&
            query->HasEverBeenActive());
}
bool
WebGL2Context::IsTransformFeedback(WebGLTransformFeedback* tf)
{
    if (IsContextLost())
        return false;

    if (!ValidateObjectAllowDeleted("isTransformFeedback", tf))
        return false;

    if (tf->IsDeleted())
        return false;

    MakeContextCurrent();
    return gl->fIsTransformFeedback(tf->mGLName);
}
Ejemplo n.º 4
0
bool
WebGLContext::IsBuffer(WebGLBuffer* buffer)
{
    if (IsContextLost())
        return false;

    if (!ValidateObjectAllowDeleted("isBuffer", buffer))
        return false;

    if (buffer->IsDeleted())
        return false;

    MakeContextCurrent();
    return gl->fIsBuffer(buffer->mGLName);
}
Ejemplo n.º 5
0
bool
WebGLContext::IsVertexArray(WebGLVertexArray* array)
{
    if (IsContextLost())
        return false;

    if (!array)
        return false;

    if (!ValidateObjectAllowDeleted("isVertexArray", array))
        return false;

    if (array->IsDeleted())
        return false;

    MakeContextCurrent();
    return array->IsVertexArray();
}
bool
WebGL2Context::IsSampler(WebGLSampler* sampler)
{
    if (IsContextLost())
        return false;

    if (!sampler)
        return false;

    if (!ValidateObjectAllowDeleted("isSampler", sampler))
        return false;

    if (sampler->IsDeleted())
        return false;

    MakeContextCurrent();
    return gl->fIsSampler(sampler->mGLName);
}