Commit eb8a5c10 authored by Robert Menzel's avatar Robert Menzel
Browse files

less padding

parent 5209b760
......@@ -79,7 +79,7 @@ class Buffer
public:
//! Most common default: a new Buffer corresponds to a new GL resource. You might decide on a binding point
//! now or later.
Buffer( GLenum _target ) : mTarget(_target), mSize(0)
Buffer( GLenum _target ) : mSize(0), mTarget(_target)
{
mBuffer = SharedBufferObject( new BufferObject() );
}
......@@ -93,11 +93,13 @@ public:
* In this case no GL wrapper calls should ever get called until one gets set!
*/
Buffer( SharedBufferObject _pBuffer, GLenum _target )
: mTarget(_target),
: mSize(0),
mBuffer( _pBuffer ),
mSize(0)
mTarget(_target)
{}
virtual ~Buffer(){}
// ==================================================================================================== \/
// ============================================================================================ GETTERS \/
// ==================================================================================================== \/
......@@ -292,9 +294,9 @@ public:
// ============================================================================================ FIELDS \/
// =================================================================================================== \/
protected:
GLenum mTarget;
SharedBufferObject mBuffer;
GLint64 mSize; // as this might get queried often (e.g. ArrayBuffer) we will explicitly mirror it in RAM)
SharedBufferObject mBuffer;
GLenum mTarget;
};
ACGL_SHARED_TYPEDEF(Buffer)
......
......@@ -66,9 +66,9 @@ public:
// ========================================================================================================= \/
public:
VertexArrayObject()
: mObjectName(0),
mpElementArrayBuffer(),
: mpElementArrayBuffer(),
mAttributes(),
mObjectName(0),
mMode(GL_TRIANGLES)
{
glGenVertexArrays(1, &mObjectName);
......@@ -375,9 +375,9 @@ public:
// ============================================================================================ FIELDS \/
// =================================================================================================== \/
private:
GLuint mObjectName; // OpenGL object name
SharedElementArrayBuffer mpElementArrayBuffer; // optional EAB
AttributeVec mAttributes; // vertex attributes
GLuint mObjectName; // OpenGL object name
GLenum mMode; // primitive type to render (e.g. GL_TRIANGLES)
//! Bind this VAO and remember the previously bound VAO
......
......@@ -71,10 +71,9 @@ private:
private:
char *mBuffer;
int mBufferSize; // how many bytes are used
int mBufferMaxSize; // size of the buffer
std::string mPrefix;
size_t mBufferSize; // how many bytes are used
size_t mBufferMaxSize; // size of the buffer
bool mNewLineIsAboutToStart;
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment