=== modified file 'src/scene-ideas/a.cc'
@@ -170,10 +170,10 @@
// Primitive state so that the draw call can issue the primitives we want.
unsigned int curOffset(0);
primVec_.push_back(PrimitiveState(GL_TRIANGLE_STRIP, 28, curOffset));
- curOffset += (28 * sizeof(unsigned int));
+ curOffset += (28 * sizeof(unsigned short));
primVec_.push_back(PrimitiveState(GL_TRIANGLE_STRIP, 17, curOffset));
- curOffset += (17 * sizeof(unsigned int));
+ curOffset += (17 * sizeof(unsigned short));
primVec_.push_back(PrimitiveState(GL_LINE_STRIP, 28, curOffset));
- curOffset += (28 * sizeof(unsigned int));
+ curOffset += (28 * sizeof(unsigned short));
primVec_.push_back(PrimitiveState(GL_LINE_STRIP, 17, curOffset));
}
=== modified file 'src/scene-ideas/characters.h'
@@ -37,7 +37,7 @@
~PrimitiveState() {}
void issue() const
{
- glDrawElements(type_, count_, GL_UNSIGNED_INT,
+ glDrawElements(type_, count_, GL_UNSIGNED_SHORT,
reinterpret_cast<const GLvoid*>(bufferOffset_));
}
private:
@@ -86,7 +86,7 @@
// Now repeat for our index data.
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, bufferObjects_[1]);
glBufferData(GL_ELEMENT_ARRAY_BUFFER,
- indexData_.size() * sizeof(unsigned int), &indexData_.front(),
+ indexData_.size() * sizeof(unsigned short), &indexData_.front(),
GL_STATIC_DRAW);
// Unbind our vertex buffer objects so that their state isn't affected
@@ -103,7 +103,7 @@
vertexArray_(0) {}
unsigned int bufferObjects_[2];
std::vector<LibMatrix::vec2> vertexData_;
- std::vector<unsigned int> indexData_;
+ std::vector<unsigned short> indexData_;
int vertexIndex_;
unsigned int vertexArray_;
std::vector<PrimitiveState> primVec_;
=== modified file 'src/scene-ideas/d.cc'
@@ -137,6 +137,6 @@
// Primitive state so that the draw call can issue the primitives we want.
unsigned int curOffset(0);
primVec_.push_back(PrimitiveState(GL_TRIANGLE_STRIP, 34, curOffset));
- curOffset += (34 * sizeof(unsigned int));
+ curOffset += (34 * sizeof(unsigned short));
primVec_.push_back(PrimitiveState(GL_LINE_STRIP, 34, curOffset));
}
=== modified file 'src/scene-ideas/e.cc'
@@ -134,6 +134,6 @@
// Primitive state so that the draw call can issue the primitives we want.
unsigned int curOffset(0);
primVec_.push_back(PrimitiveState(GL_TRIANGLE_STRIP, 33, curOffset));
- curOffset += (33 * sizeof(unsigned int));
+ curOffset += (33 * sizeof(unsigned short));
primVec_.push_back(PrimitiveState(GL_LINE_STRIP, 33, curOffset));
}
=== modified file 'src/scene-ideas/i.cc'
@@ -107,10 +107,10 @@
// Primitive state so that the draw call can issue the primitives we want.
unsigned int curOffset(0);
primVec_.push_back(PrimitiveState(GL_TRIANGLE_STRIP, 20, curOffset));
- curOffset += (20 * sizeof(unsigned int));
+ curOffset += (20 * sizeof(unsigned short));
primVec_.push_back(PrimitiveState(GL_TRIANGLE_STRIP, 4, curOffset));
- curOffset += (4 * sizeof(unsigned int));
+ curOffset += (4 * sizeof(unsigned short));
primVec_.push_back(PrimitiveState(GL_TRIANGLE_STRIP, 20, curOffset));
- curOffset += (20 * sizeof(unsigned int));
+ curOffset += (20 * sizeof(unsigned short));
primVec_.push_back(PrimitiveState(GL_TRIANGLE_STRIP, 4, curOffset));
}
=== modified file 'src/scene-ideas/lamp.cc'
@@ -204,7 +204,7 @@
// Now repeat for our index data.
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, bufferObjects_[1]);
- glBufferData(GL_ELEMENT_ARRAY_BUFFER, indexData_.size() * sizeof(unsigned int), &indexData_.front(), GL_STATIC_DRAW);
+ glBufferData(GL_ELEMENT_ARRAY_BUFFER, indexData_.size() * sizeof(unsigned short), &indexData_.front(), GL_STATIC_DRAW);
// We're ready to go.
valid_ = true;
@@ -234,10 +234,10 @@
litProgram_[light0PositionName_] = lightPositions[0];
litProgram_[light1PositionName_] = lightPositions[1];
litProgram_[light2PositionName_] = lightPositions[2];
- static const unsigned int sui(sizeof(unsigned int));
+ static const unsigned int sus(sizeof(unsigned short));
for (unsigned int i = 0; i < 5; i++)
{
- glDrawElements(GL_TRIANGLE_STRIP, 26, GL_UNSIGNED_INT, reinterpret_cast<const GLvoid*>(i * 26 * sui));
+ glDrawElements(GL_TRIANGLE_STRIP, 26, GL_UNSIGNED_SHORT, reinterpret_cast<const GLvoid*>(i * 26 * sus));
}
glDisableVertexAttribArray(normalIndex);
glDisableVertexAttribArray(vertexIndex);
@@ -249,7 +249,7 @@
glEnableVertexAttribArray(vertexIndex);
unlitProgram_[modelviewName_] = mv;
unlitProgram_[projectionName_] = projection.getCurrent();
- glDrawElements(GL_TRIANGLE_FAN, 12, GL_UNSIGNED_INT, reinterpret_cast<const GLvoid*>(5 * 26 * sui));
+ glDrawElements(GL_TRIANGLE_FAN, 12, GL_UNSIGNED_SHORT, reinterpret_cast<const GLvoid*>(5 * 26 * sus));
glDisableVertexAttribArray(vertexIndex);
unlitProgram_.stop();
=== modified file 'src/scene-ideas/lamp.h'
@@ -56,7 +56,7 @@
static const std::string normalAttribName_;
static const std::string normalMatrixName_;
std::vector<LibMatrix::vec3> vertexData_;
- std::vector<unsigned int> indexData_;
+ std::vector<unsigned short> indexData_;
unsigned int bufferObjects_[2];
bool valid_;
};
=== modified file 'src/scene-ideas/logo.cc'
@@ -487,7 +487,7 @@
// Now repeat for our index data.
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, bufferObjects_[1]);
- glBufferData(GL_ELEMENT_ARRAY_BUFFER, indexData_.size() * sizeof(unsigned int),
+ glBufferData(GL_ELEMENT_ARRAY_BUFFER, indexData_.size() * sizeof(unsigned short),
&indexData_.front(), GL_STATIC_DRAW);
// Setup our the texture that the shadow program will use...
@@ -560,7 +560,6 @@
void
SGILogo::drawElbow(void)
{
- static const unsigned int sui(sizeof(unsigned int));
unsigned int startIdx(0);
unsigned int endIdx(6);
if (drawStyle_ == LOGO_NORMAL)
@@ -579,8 +578,8 @@
for (unsigned int i = startIdx; i < endIdx; i++)
{
- unsigned int curOffset(i * 18 * sui);
- glDrawElements(GL_TRIANGLE_STRIP, 18, GL_UNSIGNED_INT,
+ unsigned int curOffset(i * 18 * sizeof(unsigned short));
+ glDrawElements(GL_TRIANGLE_STRIP, 18, GL_UNSIGNED_SHORT,
reinterpret_cast<const GLvoid*>(curOffset));
}
}
=== modified file 'src/scene-ideas/logo.h'
@@ -71,7 +71,7 @@
std::vector<LibMatrix::vec3> elbowVertices_;
std::vector<LibMatrix::vec3> elbowNormals_;
std::vector<LibMatrix::vec3> elbowShadowVertices_;
- std::vector<unsigned int> indexData_;
+ std::vector<unsigned short> indexData_;
// A simple map so we know where each section of our data starts within
// our vertex buffer object.
struct VertexDataMap
=== modified file 'src/scene-ideas/m.cc'
@@ -197,14 +197,14 @@
// Primitive state so that the draw call can issue the primitives we want.
unsigned int curOffset(0);
primVec_.push_back(PrimitiveState(GL_LINE_STRIP, 13, curOffset));
- curOffset += (13 * sizeof(unsigned int));
+ curOffset += (13 * sizeof(unsigned short));
primVec_.push_back(PrimitiveState(GL_LINE_STRIP, 17, curOffset));
- curOffset += (17 * sizeof(unsigned int));
+ curOffset += (17 * sizeof(unsigned short));
primVec_.push_back(PrimitiveState(GL_LINE_STRIP, 24, curOffset));
- curOffset += (24 * sizeof(unsigned int));
+ curOffset += (24 * sizeof(unsigned short));
primVec_.push_back(PrimitiveState(GL_TRIANGLE_STRIP, 13, curOffset));
- curOffset += (13 * sizeof(unsigned int));
+ curOffset += (13 * sizeof(unsigned short));
primVec_.push_back(PrimitiveState(GL_TRIANGLE_STRIP, 17, curOffset));
- curOffset += (17 * sizeof(unsigned int));
+ curOffset += (17 * sizeof(unsigned short));
primVec_.push_back(PrimitiveState(GL_TRIANGLE_STRIP, 24, curOffset));
}
=== modified file 'src/scene-ideas/n.cc'
@@ -137,10 +137,10 @@
// Primitive state so that the draw call can issue the primitives we want.
unsigned int curOffset(0);
primVec_.push_back(PrimitiveState(GL_TRIANGLE_STRIP, 11, curOffset));
- curOffset += (11 * sizeof(unsigned int));
+ curOffset += (11 * sizeof(unsigned short));
primVec_.push_back(PrimitiveState(GL_TRIANGLE_STRIP, 23, curOffset));
- curOffset += (23 * sizeof(unsigned int));
+ curOffset += (23 * sizeof(unsigned short));
primVec_.push_back(PrimitiveState(GL_LINE_STRIP, 11, curOffset));
- curOffset += (11 * sizeof(unsigned int));
+ curOffset += (11 * sizeof(unsigned short));
primVec_.push_back(PrimitiveState(GL_LINE_STRIP, 23, curOffset));
}
=== modified file 'src/scene-ideas/o.cc'
@@ -134,6 +134,6 @@
// Primitive state so that the draw call can issue the primitives we want.
unsigned int curOffset(0);
primVec_.push_back(PrimitiveState(GL_TRIANGLE_STRIP, 33, curOffset));
- curOffset += (33 * sizeof(unsigned int));
+ curOffset += (33 * sizeof(unsigned short));
primVec_.push_back(PrimitiveState(GL_LINE_STRIP, 33, curOffset));
}
=== modified file 'src/scene-ideas/s.cc'
@@ -125,6 +125,6 @@
// Primitive state so that the draw call can issue the primitives we want.
unsigned int curOffset(0);
primVec_.push_back(PrimitiveState(GL_TRIANGLE_STRIP, 30, curOffset));
- curOffset += (30 * sizeof(unsigned int));
+ curOffset += (30 * sizeof(unsigned short));
primVec_.push_back(PrimitiveState(GL_LINE_STRIP, 30, curOffset));
}
=== modified file 'src/scene-ideas/t.cc'
@@ -134,14 +134,14 @@
// Primitive state so that the draw call can issue the primitives we want.
unsigned int curOffset(0);
primVec_.push_back(PrimitiveState(GL_TRIANGLE_STRIP, 18, curOffset));
- curOffset += (18 * sizeof(unsigned int));
+ curOffset += (18 * sizeof(unsigned short));
primVec_.push_back(PrimitiveState(GL_TRIANGLE_STRIP, 7, curOffset));
- curOffset += (7 * sizeof(unsigned int));
+ curOffset += (7 * sizeof(unsigned short));
primVec_.push_back(PrimitiveState(GL_TRIANGLE_STRIP, 8, curOffset));
- curOffset += (8 * sizeof(unsigned int));
+ curOffset += (8 * sizeof(unsigned short));
primVec_.push_back(PrimitiveState(GL_LINE_STRIP, 18, curOffset));
- curOffset += (18 * sizeof(unsigned int));
+ curOffset += (18 * sizeof(unsigned short));
primVec_.push_back(PrimitiveState(GL_LINE_STRIP, 7, curOffset));
- curOffset += (7 * sizeof(unsigned int));
+ curOffset += (7 * sizeof(unsigned short));
primVec_.push_back(PrimitiveState(GL_LINE_STRIP, 8, curOffset));
}
=== modified file 'src/scene-ideas/table.cc'
@@ -178,7 +178,7 @@
// Now repeat for our index data.
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, bufferObjects_[1]);
- glBufferData(GL_ELEMENT_ARRAY_BUFFER, indexData_.size() * sizeof(unsigned int),
+ glBufferData(GL_ELEMENT_ARRAY_BUFFER, indexData_.size() * sizeof(unsigned short),
&indexData_.front(), GL_STATIC_DRAW);
// We're ready to go.
@@ -238,8 +238,8 @@
static const unsigned int twiceRes(2 * (TABLERES_ + 1));
for (unsigned int i = 0; i < TABLERES_; i++)
{
- glDrawElements(GL_TRIANGLE_STRIP, twiceRes, GL_UNSIGNED_INT,
- reinterpret_cast<const GLvoid*>(i * twiceRes * sizeof(unsigned int)));
+ glDrawElements(GL_TRIANGLE_STRIP, twiceRes, GL_UNSIGNED_SHORT,
+ reinterpret_cast<const GLvoid*>(i * twiceRes * sizeof(unsigned short)));
}
glDisableVertexAttribArray(tableVertexIndex_);
tableProgram_.stop();
@@ -340,8 +340,8 @@
static const unsigned int twiceRes(2 * (TABLERES_ + 1));
for (unsigned int i = 0; i < TABLERES_; i++)
{
- glDrawElements(GL_TRIANGLE_STRIP, twiceRes, GL_UNSIGNED_INT,
- reinterpret_cast<const GLvoid*>(i * twiceRes * sizeof(unsigned int)));
+ glDrawElements(GL_TRIANGLE_STRIP, twiceRes, GL_UNSIGNED_SHORT,
+ reinterpret_cast<const GLvoid*>(i * twiceRes * sizeof(unsigned short)));
}
glDisableVertexAttribArray(underVertexIndex_);
underProgram_.stop();
=== modified file 'src/scene-ideas/table.h'
@@ -83,7 +83,7 @@
unsigned int totalSize;
} dataMap_;
unsigned int bufferObjects_[2];
- std::vector<unsigned int> indexData_;
+ std::vector<unsigned short> indexData_;
int tableVertexIndex_;
int paperVertexIndex_;
int textVertexIndex_;