Ejemplo n.º 1
0
WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES(WebGLRenderingContextBase* ctx, VAOType type)
    : WebGLVertexArrayObjectBase(ctx, type)
{
    Extensions3D* extensions = context()->graphicsContext3D()->getExtensions();
    switch (m_type) {
    case VAOTypeDefault:
        break;
    default:
        setObject(extensions->createVertexArrayOES());
        break;
    }
}
WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES(WebGLRenderingContext* ctx, VaoType type)
    : WebGLContextObject(ctx)
    , m_type(type)
    , m_hasEverBeenBound(false)
    , m_boundElementArrayBuffer(0)
{
    m_vertexAttribState.resize(ctx->getMaxVertexAttribs());
    
    Extensions3D* extensions = context()->graphicsContext3D()->getExtensions();
    switch (m_type) {
    case VaoTypeDefault:
        break;
    default:
        setObject(extensions->createVertexArrayOES());
        break;
    }
}