OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 15 matching lines...) Expand all Loading... | |
26 #ifndef WebGLVertexArrayObjectOES_h | 26 #ifndef WebGLVertexArrayObjectOES_h |
27 #define WebGLVertexArrayObjectOES_h | 27 #define WebGLVertexArrayObjectOES_h |
28 | 28 |
29 #include "bindings/v8/ScriptWrappable.h" | 29 #include "bindings/v8/ScriptWrappable.h" |
30 #include "core/html/canvas/WebGLBuffer.h" | 30 #include "core/html/canvas/WebGLBuffer.h" |
31 #include "core/html/canvas/WebGLContextObject.h" | 31 #include "core/html/canvas/WebGLContextObject.h" |
32 #include "wtf/PassRefPtr.h" | 32 #include "wtf/PassRefPtr.h" |
33 | 33 |
34 namespace WebCore { | 34 namespace WebCore { |
35 | 35 |
36 class WebGLVertexArrayObjectOES : public WebGLContextObject, public ScriptWrappa ble { | 36 class WebGLVertexArrayObjectOES FINAL : public WebGLContextObject, public Script Wrappable { |
37 public: | 37 public: |
38 enum VaoType { | 38 enum VaoType { |
39 VaoTypeDefault, | 39 VaoTypeDefault, |
40 VaoTypeUser, | 40 VaoTypeUser, |
41 }; | 41 }; |
42 | 42 |
43 virtual ~WebGLVertexArrayObjectOES(); | 43 virtual ~WebGLVertexArrayObjectOES(); |
44 | 44 |
45 static PassRefPtr<WebGLVertexArrayObjectOES> create(WebGLRenderingContext*, VaoType); | 45 static PassRefPtr<WebGLVertexArrayObjectOES> create(WebGLRenderingContext*, VaoType); |
46 | 46 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
80 void setElementArrayBuffer(PassRefPtr<WebGLBuffer>); | 80 void setElementArrayBuffer(PassRefPtr<WebGLBuffer>); |
81 | 81 |
82 VertexAttribState& getVertexAttribState(int index) { return m_vertexAttribSt ate[index]; } | 82 VertexAttribState& getVertexAttribState(int index) { return m_vertexAttribSt ate[index]; } |
83 void setVertexAttribState(GLuint, GLsizei, GLint, GLenum, GLboolean, GLsizei , GLintptr, PassRefPtr<WebGLBuffer>); | 83 void setVertexAttribState(GLuint, GLsizei, GLint, GLenum, GLboolean, GLsizei , GLintptr, PassRefPtr<WebGLBuffer>); |
84 void unbindBuffer(PassRefPtr<WebGLBuffer>); | 84 void unbindBuffer(PassRefPtr<WebGLBuffer>); |
85 void setVertexAttribDivisor(GLuint index, GLuint divisor); | 85 void setVertexAttribDivisor(GLuint index, GLuint divisor); |
86 | 86 |
87 private: | 87 private: |
88 WebGLVertexArrayObjectOES(WebGLRenderingContext*, VaoType); | 88 WebGLVertexArrayObjectOES(WebGLRenderingContext*, VaoType); |
89 | 89 |
90 virtual void deleteObjectImpl(GraphicsContext3D*, Platform3DObject); | 90 virtual void deleteObjectImpl(GraphicsContext3D*, Platform3DObject) OVERRIDE ; |
91 | |
92 virtual bool isVertexArray() const { return true; } | |
eseidel
2014/01/10 19:11:22
Dead?
Inactive
2014/01/10 19:18:26
Yes, it does not override anything and it is never
| |
93 | 91 |
94 VaoType m_type; | 92 VaoType m_type; |
95 bool m_hasEverBeenBound; | 93 bool m_hasEverBeenBound; |
96 RefPtr<WebGLBuffer> m_boundElementArrayBuffer; | 94 RefPtr<WebGLBuffer> m_boundElementArrayBuffer; |
97 Vector<VertexAttribState> m_vertexAttribState; | 95 Vector<VertexAttribState> m_vertexAttribState; |
98 }; | 96 }; |
99 | 97 |
100 } // namespace WebCore | 98 } // namespace WebCore |
101 | 99 |
102 #endif // WebGLVertexArrayObjectOES_h | 100 #endif // WebGLVertexArrayObjectOES_h |
OLD | NEW |