Introduced new BufferObject design + implementation in preperation of implementing a pool system for buffer objects

This commit is contained in:
Robert Osfield
2009-10-01 20:19:42 +00:00
parent cfac6a7809
commit f75013d534
24 changed files with 1067 additions and 842 deletions

View File

@@ -33,7 +33,7 @@ void DrawElementsUByte::write(DataOutputStream* out){
// Write array length and its elements.
out->writeInt(size());
out->writeCharArray((const char*)&front(), size() * CHARSIZE);
if (size()!=0) out->writeCharArray((const char*)&front(), size() * CHARSIZE);
}
void DrawElementsUByte::read(DataInputStream* in){
@@ -53,7 +53,7 @@ void DrawElementsUByte::read(DataInputStream* in){
// Read array length and its elements.
int size = in->readInt();
resize(size);
in->readCharArray((char*)&front(), size * CHARSIZE);
if (size!=0) in->readCharArray((char*)&front(), size * CHARSIZE);
}
else{