daniel@transgaming.com | 2c4d070 | 2012-12-20 21:08:51 +0000 | [diff] [blame] | 1 | // |
| 2 | // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. |
| 3 | // Use of this source code is governed by a BSD-style license that can be |
| 4 | // found in the LICENSE file. |
| 5 | // |
| 6 | |
| 7 | // VertexBuffer11.h: Defines the D3D11 VertexBuffer implementation. |
| 8 | |
| 9 | #ifndef LIBGLESV2_RENDERER_VERTEXBUFFER11_H_ |
| 10 | #define LIBGLESV2_RENDERER_VERTEXBUFFER11_H_ |
| 11 | |
| 12 | #include "libGLESv2/renderer/VertexBuffer.h" |
daniel@transgaming.com | 2c4d070 | 2012-12-20 21:08:51 +0000 | [diff] [blame] | 13 | |
daniel@transgaming.com | 2c4d070 | 2012-12-20 21:08:51 +0000 | [diff] [blame] | 14 | namespace rx |
| 15 | { |
shannon.woods@transgaming.com | 486d9e9 | 2013-02-28 23:15:41 +0000 | [diff] [blame] | 16 | class Renderer11; |
daniel@transgaming.com | 2c4d070 | 2012-12-20 21:08:51 +0000 | [diff] [blame] | 17 | |
| 18 | class VertexBuffer11 : public VertexBuffer |
| 19 | { |
| 20 | public: |
| 21 | explicit VertexBuffer11(rx::Renderer11 *const renderer); |
| 22 | virtual ~VertexBuffer11(); |
| 23 | |
| 24 | virtual bool initialize(unsigned int size, bool dynamicUsage); |
| 25 | |
| 26 | static VertexBuffer11 *makeVertexBuffer11(VertexBuffer *vetexBuffer); |
| 27 | |
Jamie Madill | a857c36 | 2013-07-02 11:57:02 -0400 | [diff] [blame] | 28 | virtual bool storeVertexAttributes(const gl::VertexAttribute &attrib, const gl::VertexAttribCurrentValueData ¤tValue, |
| 29 | GLint start, GLsizei count, GLsizei instances, unsigned int offset); |
daniel@transgaming.com | 2c4d070 | 2012-12-20 21:08:51 +0000 | [diff] [blame] | 30 | |
Geoff Lang | a36ead4 | 2013-08-02 11:54:08 -0400 | [diff] [blame] | 31 | virtual bool getSpaceRequired(const gl::VertexAttribute &attrib, GLsizei count, GLsizei instances, |
| 32 | unsigned int *outSpaceRequired) const; |
daniel@transgaming.com | 2c4d070 | 2012-12-20 21:08:51 +0000 | [diff] [blame] | 33 | |
| 34 | virtual unsigned int getBufferSize() const; |
| 35 | virtual bool setBufferSize(unsigned int size); |
| 36 | virtual bool discard(); |
| 37 | |
daniel@transgaming.com | 2c4d070 | 2012-12-20 21:08:51 +0000 | [diff] [blame] | 38 | ID3D11Buffer *getBuffer() const; |
| 39 | |
| 40 | private: |
| 41 | DISALLOW_COPY_AND_ASSIGN(VertexBuffer11); |
| 42 | |
| 43 | rx::Renderer11 *const mRenderer; |
| 44 | |
| 45 | ID3D11Buffer *mBuffer; |
| 46 | unsigned int mBufferSize; |
| 47 | bool mDynamicUsage; |
daniel@transgaming.com | 2c4d070 | 2012-12-20 21:08:51 +0000 | [diff] [blame] | 48 | }; |
| 49 | |
| 50 | } |
| 51 | |
shannon.woods%transgaming.com@gtempaccount.com | cf8d2f8 | 2013-04-13 03:37:34 +0000 | [diff] [blame] | 52 | #endif // LIBGLESV2_RENDERER_VERTEXBUFFER11_H_ |