#ifndef WebGLRenderingContext_h
#define WebGLRenderingContext_h
#include "bindings/v8/ScriptWrappable.h"
#include "core/html/canvas/WebGLRenderingContextBase.h"
namespace WebCore {
class WebGLRenderingContext FINAL : public ScriptWrappable, public WebGLRenderingContextBase {
public:
static PassOwnPtr<WebGLRenderingContext> create(HTMLCanvasElement*, WebGLContextAttributes*);
virtual ~WebGLRenderingContext();
virtual unsigned version() const OVERRIDE { return 1; }
virtual String contextName() const OVERRIDE { return "WebGLRenderingContext"; }
virtual void registerContextExtensions() OVERRIDE;
private:
WebGLRenderingContext(HTMLCanvasElement*, PassOwnPtr<blink::WebGraphicsContext3D>, WebGLContextAttributes*);
RefPtr<ANGLEInstancedArrays> m_angleInstancedArrays;
RefPtr<EXTFragDepth> m_extFragDepth;
RefPtr<EXTTextureFilterAnisotropic> m_extTextureFilterAnisotropic;
RefPtr<OESTextureFloat> m_oesTextureFloat;
RefPtr<OESTextureFloatLinear> m_oesTextureFloatLinear;
RefPtr<OESTextureHalfFloat> m_oesTextureHalfFloat;
RefPtr<OESTextureHalfFloatLinear> m_oesTextureHalfFloatLinear;
RefPtr<OESStandardDerivatives> m_oesStandardDerivatives;
RefPtr<OESVertexArrayObject> m_oesVertexArrayObject;
RefPtr<OESElementIndexUint> m_oesElementIndexUint;
RefPtr<WebGLLoseContext> m_webglLoseContext;
RefPtr<WebGLDebugRendererInfo> m_webglDebugRendererInfo;
RefPtr<WebGLDebugShaders> m_webglDebugShaders;
RefPtr<WebGLDrawBuffers> m_webglDrawBuffers;
RefPtr<WebGLCompressedTextureATC> m_webglCompressedTextureATC;
RefPtr<WebGLCompressedTexturePVRTC> m_webglCompressedTexturePVRTC;
RefPtr<WebGLCompressedTextureS3TC> m_webglCompressedTextureS3TC;
RefPtr<WebGLDepthTexture> m_webglDepthTexture;
};
DEFINE_TYPE_CASTS(WebGLRenderingContext, CanvasRenderingContext, context,
context->is3d() && WebGLRenderingContextBase::getWebGLVersion(context) == 1,
context.is3d() && WebGLRenderingContextBase::getWebGLVersion(&context) == 1);
}
#endif