X-Git-Url: http://git.tdb.fi/?p=gldbg.git;a=blobdiff_plain;f=source%2Fbufferstate.h;h=393168d72141a721afa3d8cc055dedc558c6b191;hp=17462c69927c850c30ff994fb5b0d63ce0d41146;hb=9cdca19aa017ea1711436977855e885d91e78ab0;hpb=64592975a49e2bd26a561f36425071427f37d5fb diff --git a/source/bufferstate.h b/source/bufferstate.h index 17462c6..393168d 100644 --- a/source/bufferstate.h +++ b/source/bufferstate.h @@ -1,7 +1,7 @@ /* $Id$ This file is part of gldbg -Copyright © 2009 Mikko Rasa, Mikkosoft Productions +Copyright © 2009-2010 Mikko Rasa, Mikkosoft Productions Distributed under the GPL */ @@ -9,14 +9,41 @@ Distributed under the GPL #define BUFFERSTATE_H_ #include +#include #include +struct ArrayState; + +struct BufferContent +{ + struct Array + { + GLenum kind; + unsigned index; + unsigned size; + GLenum type; + int offset; + + Array(const ArrayState &); + }; + + bool consistent; + unsigned stride; + std::vector arrays; + + BufferContent(); + void update(const ArrayState &); + std::string describe() const; +}; + struct BufferState { unsigned id; + GLenum target; GLenum usage; unsigned size; char *data; + BufferContent content; BufferState(); void set_data(unsigned, const void *, GLenum);