mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
fix syntax issues for constant names and the CmakeLists.txt useless change
This commit is contained in:
parent
4f26c9e0fa
commit
ba2d072a65
3 changed files with 10 additions and 10 deletions
|
@ -20,7 +20,7 @@ if (WIN32)
|
|||
# set path for Microsoft SDKs
|
||||
# if get build error about missing 'glu32' this path is likely wrong
|
||||
# Uncomment the line with 8.1 if running Windows 8.1
|
||||
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "C:\\Program Files (x86)\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\x86")
|
||||
#set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "C:\\Program Files (x86)\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\x86")
|
||||
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1 ")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
||||
elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
|
|
@ -399,8 +399,8 @@ void Avatar::render(const glm::vec3& cameraPosition, RenderMode renderMode, bool
|
|||
} else {
|
||||
glTranslatef(_position.x, getDisplayNamePosition().y + LOOK_AT_INDICATOR_OFFSET, _position.z);
|
||||
}
|
||||
Application::getInstance()->getGeometryCache()->renderSphere(LOOK_AT_INDICATOR_RADIUS, 15, 15);
|
||||
glPopMatrix();
|
||||
Application::getInstance()->getGeometryCache()->renderSphere(LOOK_AT_INDICATOR_RADIUS, 15, 15);
|
||||
glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -427,7 +427,7 @@ void Avatar::render(const glm::vec3& cameraPosition, RenderMode renderMode, bool
|
|||
glPushMatrix();
|
||||
glTranslatef(_position.x, _position.y, _position.z);
|
||||
glScalef(height, height, height);
|
||||
Application::getInstance()->getGeometryCache()->renderSphere(sphereRadius, 15, 15);
|
||||
Application::getInstance()->getGeometryCache()->renderSphere(sphereRadius, 15, 15);
|
||||
|
||||
glPopMatrix();
|
||||
}
|
||||
|
|
|
@ -114,12 +114,12 @@ void GeometryCache::renderHemisphere(int slices, int stacks) {
|
|||
void GeometryCache::renderSphere(float radius, int slices, int stacks) {
|
||||
VerticesIndices& vbo = _sphereVBOs[IntPair(slices, stacks)];
|
||||
int vertices = slices * (stacks - 1) + 2;
|
||||
int numVerticesPerTriangle = 3;
|
||||
int numTrianglesPerQuad = 2;
|
||||
int indices = slices * numTrianglesPerQuad * numVerticesPerTriangle * (stacks - 1) + slices * numTrianglesPerQuad * numVerticesPerTriangle;
|
||||
const int NUM_VERTICES_PER_TRIANGLE = 3;
|
||||
const int NUM_TRIANGLES_PER_QUAD = 2;
|
||||
int indices = slices * NUM_TRIANGLES_PER_QUAD * NUM_VERTICES_PER_TRIANGLE * (stacks - 1) + slices * NUM_TRIANGLES_PER_QUAD * NUM_VERTICES_PER_TRIANGLE;
|
||||
if (vbo.first == 0) {
|
||||
int numCoordinatesPerVertex = 3;
|
||||
GLfloat* vertexData = new GLfloat[vertices * numCoordinatesPerVertex];
|
||||
const int NUM_COORDS_PER_VERTEX = 3;
|
||||
GLfloat* vertexData = new GLfloat[vertices * NUM_COORDS_PER_VERTEX];
|
||||
GLfloat* vertex = vertexData;
|
||||
|
||||
// south pole
|
||||
|
@ -148,7 +148,7 @@ void GeometryCache::renderSphere(float radius, int slices, int stacks) {
|
|||
|
||||
glGenBuffers(1, &vbo.first);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, vbo.first);
|
||||
const int BYTES_PER_VERTEX = numCoordinatesPerVertex * sizeof(GLfloat);
|
||||
const int BYTES_PER_VERTEX = NUM_COORDS_PER_VERTEX * sizeof(GLfloat);
|
||||
glBufferData(GL_ARRAY_BUFFER, vertices * BYTES_PER_VERTEX, vertexData, GL_STATIC_DRAW);
|
||||
delete[] vertexData;
|
||||
|
||||
|
|
Loading…
Reference in a new issue