[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/libs/kgllib/core/kgllib
From: Rivo Laks <rivolaks () hot ! ee>
Date: 2008-08-30 18:16:49
Message-ID: 1220120209.161198.14806.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 854954 by rivol:
Argh, fix compilation
M +3 -3 batch.cpp
M +9 -0 geometrybuffer.cpp
M +2 -0 geometrybuffer.h
--- trunk/playground/libs/kgllib/core/kgllib/batch.cpp #854953:854954
@@ -181,21 +181,21 @@
int indexcount = 0;
foreach (Batch* b, batches) {
vertexcount += b->vertexCount();
- indexcount += b->indexCount();
+ indexcount += b->indicesCount();
}
GeometryBufferFormat format = batches.first()->bestBufferFormat();
format.setVertexCount(vertexcount);
format.setIndexCount(indexcount);
- GeometryBuffer* buffer = new GeometryBuffer(format);
+ GeometryBuffer* buffer = GeometryBuffer::createBuffer(format);
int vertexoffset = 0;
int indexoffset = 0;
foreach (Batch* b, batches) {
b->setBuffer(buffer, vertexoffset, indexoffset),
vertexoffset += b->vertexCount();
- indexoffset += b->indexCount();
+ indexoffset += b->indicesCount();
}
return buffer;
--- trunk/playground/libs/kgllib/core/kgllib/geometrybuffer.cpp #854953:854954
@@ -66,8 +66,17 @@
mTexCoordSize = 0;
}
+void GeometryBufferFormat::setVertexCount(int count)
+{
+ mVertexCount = count;
+}
+void GeometryBufferFormat::setIndexCount(int count)
+{
+ mIndexCount = count;
+}
+
/** Static buffer creation helper methods **/
GeometryBuffer* GeometryBuffer::createBuffer(const GeometryBufferFormat& format)
{
--- trunk/playground/libs/kgllib/core/kgllib/geometrybuffer.h #854953:854954
@@ -100,6 +100,7 @@
* @see indexCount()
**/
int vertexCount() const { return mVertexCount; }
+ void setVertexCount(int count);
/**
* @return number of indices.
*
@@ -110,6 +111,7 @@
* @see vertexCount(), isIndexed()
**/
int indexCount() const { return mIndexCount; }
+ void setIndexCount(int count);
/**
* @return whether this is an indexed format or not.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic