mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 19:22:57 +02: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
|
# set path for Microsoft SDKs
|
||||||
# if get build error about missing 'glu32' this path is likely wrong
|
# if get build error about missing 'glu32' this path is likely wrong
|
||||||
# Uncomment the line with 8.1 if running Windows 8.1
|
# 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_PREFIX_PATH ${CMAKE_PREFIX_PATH} "C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1 ")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
||||||
elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
|
|
@ -114,12 +114,12 @@ void GeometryCache::renderHemisphere(int slices, int stacks) {
|
||||||
void GeometryCache::renderSphere(float radius, int slices, int stacks) {
|
void GeometryCache::renderSphere(float radius, int slices, int stacks) {
|
||||||
VerticesIndices& vbo = _sphereVBOs[IntPair(slices, stacks)];
|
VerticesIndices& vbo = _sphereVBOs[IntPair(slices, stacks)];
|
||||||
int vertices = slices * (stacks - 1) + 2;
|
int vertices = slices * (stacks - 1) + 2;
|
||||||
int numVerticesPerTriangle = 3;
|
const int NUM_VERTICES_PER_TRIANGLE = 3;
|
||||||
int numTrianglesPerQuad = 2;
|
const int NUM_TRIANGLES_PER_QUAD = 2;
|
||||||
int indices = slices * numTrianglesPerQuad * numVerticesPerTriangle * (stacks - 1) + slices * numTrianglesPerQuad * numVerticesPerTriangle;
|
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) {
|
if (vbo.first == 0) {
|
||||||
int numCoordinatesPerVertex = 3;
|
const int NUM_COORDS_PER_VERTEX = 3;
|
||||||
GLfloat* vertexData = new GLfloat[vertices * numCoordinatesPerVertex];
|
GLfloat* vertexData = new GLfloat[vertices * NUM_COORDS_PER_VERTEX];
|
||||||
GLfloat* vertex = vertexData;
|
GLfloat* vertex = vertexData;
|
||||||
|
|
||||||
// south pole
|
// south pole
|
||||||
|
@ -148,7 +148,7 @@ void GeometryCache::renderSphere(float radius, int slices, int stacks) {
|
||||||
|
|
||||||
glGenBuffers(1, &vbo.first);
|
glGenBuffers(1, &vbo.first);
|
||||||
glBindBuffer(GL_ARRAY_BUFFER, 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);
|
glBufferData(GL_ARRAY_BUFFER, vertices * BYTES_PER_VERTEX, vertexData, GL_STATIC_DRAW);
|
||||||
delete[] vertexData;
|
delete[] vertexData;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue