| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 , size(4) | 55 , size(4) |
| 56 , type(GL_FLOAT) | 56 , type(GL_FLOAT) |
| 57 , normalized(false) | 57 , normalized(false) |
| 58 , stride(16) | 58 , stride(16) |
| 59 , originalStride(0) | 59 , originalStride(0) |
| 60 , offset(0) | 60 , offset(0) |
| 61 , divisor(0) | 61 , divisor(0) |
| 62 { | 62 { |
| 63 } | 63 } |
| 64 | 64 |
| 65 void trace(Visitor*); | 65 DECLARE_TRACE(); |
| 66 | 66 |
| 67 bool enabled; | 67 bool enabled; |
| 68 RefPtrWillBeMember<WebGLBuffer> bufferBinding; | 68 RefPtrWillBeMember<WebGLBuffer> bufferBinding; |
| 69 GLsizei bytesPerElement; | 69 GLsizei bytesPerElement; |
| 70 GLint size; | 70 GLint size; |
| 71 GLenum type; | 71 GLenum type; |
| 72 bool normalized; | 72 bool normalized; |
| 73 GLsizei stride; | 73 GLsizei stride; |
| 74 GLsizei originalStride; | 74 GLsizei originalStride; |
| 75 GLintptr offset; | 75 GLintptr offset; |
| 76 GLuint divisor; | 76 GLuint divisor; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 bool isDefaultObject() const { return m_type == VaoTypeDefault; } | 79 bool isDefaultObject() const { return m_type == VaoTypeDefault; } |
| 80 | 80 |
| 81 bool hasEverBeenBound() const { return object() && m_hasEverBeenBound; } | 81 bool hasEverBeenBound() const { return object() && m_hasEverBeenBound; } |
| 82 void setHasEverBeenBound() { m_hasEverBeenBound = true; } | 82 void setHasEverBeenBound() { m_hasEverBeenBound = true; } |
| 83 | 83 |
| 84 PassRefPtrWillBeRawPtr<WebGLBuffer> boundElementArrayBuffer() const { return
m_boundElementArrayBuffer; } | 84 PassRefPtrWillBeRawPtr<WebGLBuffer> boundElementArrayBuffer() const { return
m_boundElementArrayBuffer; } |
| 85 void setElementArrayBuffer(PassRefPtrWillBeRawPtr<WebGLBuffer>); | 85 void setElementArrayBuffer(PassRefPtrWillBeRawPtr<WebGLBuffer>); |
| 86 | 86 |
| 87 VertexAttribState& getVertexAttribState(int index) { return m_vertexAttribSt
ate[index]; } | 87 VertexAttribState& getVertexAttribState(int index) { return m_vertexAttribSt
ate[index]; } |
| 88 void setVertexAttribState(GLuint, GLsizei, GLint, GLenum, GLboolean, GLsizei
, GLintptr, PassRefPtrWillBeRawPtr<WebGLBuffer>); | 88 void setVertexAttribState(GLuint, GLsizei, GLint, GLenum, GLboolean, GLsizei
, GLintptr, PassRefPtrWillBeRawPtr<WebGLBuffer>); |
| 89 void unbindBuffer(PassRefPtrWillBeRawPtr<WebGLBuffer>); | 89 void unbindBuffer(PassRefPtrWillBeRawPtr<WebGLBuffer>); |
| 90 void setVertexAttribDivisor(GLuint index, GLuint divisor); | 90 void setVertexAttribDivisor(GLuint index, GLuint divisor); |
| 91 | 91 |
| 92 virtual void trace(Visitor*) override; | 92 DECLARE_VIRTUAL_TRACE(); |
| 93 | 93 |
| 94 private: | 94 private: |
| 95 WebGLVertexArrayObjectOES(WebGLRenderingContextBase*, VaoType); | 95 WebGLVertexArrayObjectOES(WebGLRenderingContextBase*, VaoType); |
| 96 | 96 |
| 97 void dispatchDetached(blink::WebGraphicsContext3D*); | 97 void dispatchDetached(blink::WebGraphicsContext3D*); |
| 98 virtual void deleteObjectImpl(blink::WebGraphicsContext3D*, Platform3DObject
) override; | 98 virtual void deleteObjectImpl(blink::WebGraphicsContext3D*, Platform3DObject
) override; |
| 99 | 99 |
| 100 VaoType m_type; | 100 VaoType m_type; |
| 101 bool m_hasEverBeenBound; | 101 bool m_hasEverBeenBound; |
| 102 #if ENABLE(OILPAN) | 102 #if ENABLE(OILPAN) |
| (...skipping 10 matching lines...) Expand all Loading... |
| 113 template<> | 113 template<> |
| 114 struct VectorTraits<blink::WebGLVertexArrayObjectOES::VertexAttribState> : Simpl
eClassVectorTraits<blink::WebGLVertexArrayObjectOES::VertexAttribState> { | 114 struct VectorTraits<blink::WebGLVertexArrayObjectOES::VertexAttribState> : Simpl
eClassVectorTraits<blink::WebGLVertexArrayObjectOES::VertexAttribState> { |
| 115 // Must use the constructor. | 115 // Must use the constructor. |
| 116 static const bool canInitializeWithMemset = false; | 116 static const bool canInitializeWithMemset = false; |
| 117 static const bool canCopyWithMemcpy = true; | 117 static const bool canCopyWithMemcpy = true; |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 } // namespace WTF | 120 } // namespace WTF |
| 121 | 121 |
| 122 #endif // WebGLVertexArrayObjectOES_h | 122 #endif // WebGLVertexArrayObjectOES_h |
| OLD | NEW |