This source file includes following definitions.
- name
- create
- supported
- extensionName
- drawArraysInstancedANGLE
- drawElementsInstancedANGLE
- vertexAttribDivisorANGLE
#include "config.h"
#include "core/html/canvas/ANGLEInstancedArrays.h"
#include "core/html/canvas/WebGLRenderingContextBase.h"
namespace WebCore {
ANGLEInstancedArrays::ANGLEInstancedArrays(WebGLRenderingContextBase* context)
: WebGLExtension(context)
{
ScriptWrappable::init(this);
context->extensionsUtil()->ensureExtensionEnabled("GL_ANGLE_instanced_arrays");
}
ANGLEInstancedArrays::~ANGLEInstancedArrays()
{
}
WebGLExtensionName ANGLEInstancedArrays::name() const
{
return ANGLEInstancedArraysName;
}
PassRefPtr<ANGLEInstancedArrays> ANGLEInstancedArrays::create(WebGLRenderingContextBase* context)
{
return adoptRef(new ANGLEInstancedArrays(context));
}
bool ANGLEInstancedArrays::supported(WebGLRenderingContextBase* context)
{
return context->extensionsUtil()->supportsExtension("GL_ANGLE_instanced_arrays");
}
const char* ANGLEInstancedArrays::extensionName()
{
return "ANGLE_instanced_arrays";
}
void ANGLEInstancedArrays::drawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount)
{
if (isLost())
return;
m_context->drawArraysInstancedANGLE(mode, first, count, primcount);
}
void ANGLEInstancedArrays::drawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, GLintptr offset, GLsizei primcount)
{
if (isLost())
return;
m_context->drawElementsInstancedANGLE(mode, count, type, offset, primcount);
}
void ANGLEInstancedArrays::vertexAttribDivisorANGLE(GLuint index, GLuint divisor)
{
if (isLost())
return;
m_context->vertexAttribDivisorANGLE(index, divisor);
}
}