2014-06-05 23:38:27 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
2014-11-14 04:03:50 +00:00
|
|
|
#ifndef WEBGL_VERTEX_ARRAY_GL_H_
|
|
|
|
#define WEBGL_VERTEX_ARRAY_GL_H_
|
2014-06-05 23:38:27 +00:00
|
|
|
|
|
|
|
#include "WebGLVertexArray.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
|
2015-06-01 06:49:47 +00:00
|
|
|
class WebGLVertexArrayGL
|
2014-06-05 23:38:27 +00:00
|
|
|
: public WebGLVertexArray
|
|
|
|
{
|
2015-06-01 06:49:47 +00:00
|
|
|
friend class WebGLVertexArray;
|
|
|
|
|
2014-06-05 23:38:27 +00:00
|
|
|
public:
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual void DeleteImpl() override;
|
|
|
|
virtual void BindVertexArrayImpl() override;
|
|
|
|
virtual void GenVertexArray() override;
|
2015-05-20 23:58:36 +00:00
|
|
|
virtual bool IsVertexArrayImpl() override;
|
2014-06-05 23:38:27 +00:00
|
|
|
|
2015-06-01 06:49:47 +00:00
|
|
|
protected:
|
2015-05-20 23:58:36 +00:00
|
|
|
explicit WebGLVertexArrayGL(WebGLContext* webgl);
|
|
|
|
~WebGLVertexArrayGL();
|
|
|
|
|
|
|
|
// Bug 1140459: Some drivers (including our test slaves!) don't
|
2015-11-26 19:44:55 +00:00
|
|
|
// give reasonable answers for IsVertexArray, maybe others.
|
2015-05-20 23:58:36 +00:00
|
|
|
//
|
|
|
|
// So we track the `is a VAO` state ourselves.
|
|
|
|
bool mIsVAO;
|
2014-06-05 23:38:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2014-11-14 04:03:50 +00:00
|
|
|
#endif // WEBGL_VERTEX_ARRAY_GL_H_
|