diff options
Diffstat (limited to 'src/3rdparty/angle/src/libGLESv2/renderer/d3d/VertexBuffer.h')
-rw-r--r-- | src/3rdparty/angle/src/libGLESv2/renderer/d3d/VertexBuffer.h | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/VertexBuffer.h b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/VertexBuffer.h index c5022d8c9c..fa747d9cb4 100644 --- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/VertexBuffer.h +++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/VertexBuffer.h @@ -11,6 +11,12 @@ #define LIBGLESV2_RENDERER_VERTEXBUFFER_H_ #include "common/angleutils.h" +#include "libGLESv2/Error.h" + +#include <GLES2/gl2.h> + +#include <cstddef> +#include <vector> namespace gl { @@ -28,16 +34,16 @@ class VertexBuffer VertexBuffer(); virtual ~VertexBuffer(); - virtual bool initialize(unsigned int size, bool dynamicUsage) = 0; + virtual gl::Error initialize(unsigned int size, bool dynamicUsage) = 0; - virtual bool storeVertexAttributes(const gl::VertexAttribute &attrib, const gl::VertexAttribCurrentValueData ¤tValue, - GLint start, GLsizei count, GLsizei instances, unsigned int offset) = 0; - virtual bool getSpaceRequired(const gl::VertexAttribute &attrib, GLsizei count, GLsizei instances, - unsigned int *outSpaceRequired) const = 0; + virtual gl::Error storeVertexAttributes(const gl::VertexAttribute &attrib, const gl::VertexAttribCurrentValueData ¤tValue, + GLint start, GLsizei count, GLsizei instances, unsigned int offset) = 0; + virtual gl::Error getSpaceRequired(const gl::VertexAttribute &attrib, GLsizei count, GLsizei instances, + unsigned int *outSpaceRequired) const = 0; virtual unsigned int getBufferSize() const = 0; - virtual bool setBufferSize(unsigned int size) = 0; - virtual bool discard() = 0; + virtual gl::Error setBufferSize(unsigned int size) = 0; + virtual gl::Error discard() = 0; unsigned int getSerial() const; @@ -57,14 +63,14 @@ class VertexBufferInterface VertexBufferInterface(rx::Renderer *renderer, bool dynamic); virtual ~VertexBufferInterface(); - bool reserveVertexSpace(const gl::VertexAttribute &attribute, GLsizei count, GLsizei instances); + gl::Error reserveVertexSpace(const gl::VertexAttribute &attribute, GLsizei count, GLsizei instances); unsigned int getBufferSize() const; unsigned int getSerial() const; - virtual bool storeVertexAttributes(const gl::VertexAttribute &attrib, const gl::VertexAttribCurrentValueData ¤tValue, - GLint start, GLsizei count, GLsizei instances, unsigned int *outStreamOffset); + virtual gl::Error storeVertexAttributes(const gl::VertexAttribute &attrib, const gl::VertexAttribCurrentValueData ¤tValue, + GLint start, GLsizei count, GLsizei instances, unsigned int *outStreamOffset); bool directStoragePossible(const gl::VertexAttribute &attrib, const gl::VertexAttribCurrentValueData ¤tValue) const; @@ -72,14 +78,14 @@ class VertexBufferInterface VertexBuffer* getVertexBuffer() const; protected: - virtual bool reserveSpace(unsigned int size) = 0; + virtual gl::Error reserveSpace(unsigned int size) = 0; unsigned int getWritePosition() const; void setWritePosition(unsigned int writePosition); - bool discard(); + gl::Error discard(); - bool setBufferSize(unsigned int size); + gl::Error setBufferSize(unsigned int size); private: DISALLOW_COPY_AND_ASSIGN(VertexBufferInterface); @@ -100,7 +106,7 @@ class StreamingVertexBufferInterface : public VertexBufferInterface ~StreamingVertexBufferInterface(); protected: - bool reserveSpace(unsigned int size); + gl::Error reserveSpace(unsigned int size); }; class StaticVertexBufferInterface : public VertexBufferInterface @@ -109,13 +115,13 @@ class StaticVertexBufferInterface : public VertexBufferInterface explicit StaticVertexBufferInterface(rx::Renderer *renderer); ~StaticVertexBufferInterface(); - bool storeVertexAttributes(const gl::VertexAttribute &attrib, const gl::VertexAttribCurrentValueData ¤tValue, - GLint start, GLsizei count, GLsizei instances, unsigned int *outStreamOffset); + gl::Error storeVertexAttributes(const gl::VertexAttribute &attrib, const gl::VertexAttribCurrentValueData ¤tValue, + GLint start, GLsizei count, GLsizei instances, unsigned int *outStreamOffset); bool lookupAttribute(const gl::VertexAttribute &attribute, unsigned int* outStreamFffset); protected: - bool reserveSpace(unsigned int size); + gl::Error reserveSpace(unsigned int size); private: struct VertexElement |