diff --git a/project/ArrayTexture/ArrayTexture.vcxproj b/project/ArrayTexture/ArrayTexture.vcxproj index c7bf667..d1c2dc9 100644 --- a/project/ArrayTexture/ArrayTexture.vcxproj +++ b/project/ArrayTexture/ArrayTexture.vcxproj @@ -22,13 +22,13 @@ Application true - v120 + v110 Unicode Application false - v120 + v110 true Unicode diff --git a/project/MultidrawIndirect/MultidrawIndirect.vcxproj b/project/MultidrawIndirect/MultidrawIndirect.vcxproj index 1f07efc..a8485df 100644 --- a/project/MultidrawIndirect/MultidrawIndirect.vcxproj +++ b/project/MultidrawIndirect/MultidrawIndirect.vcxproj @@ -19,13 +19,13 @@ Application true - v120 + v110 Unicode Application false - v120 + v110 true Unicode diff --git a/project/PersistentMappedBuffer/PersistentMappedBuffer.vcxproj b/project/PersistentMappedBuffer/PersistentMappedBuffer.vcxproj index 4851506..0d7a0e0 100644 --- a/project/PersistentMappedBuffer/PersistentMappedBuffer.vcxproj +++ b/project/PersistentMappedBuffer/PersistentMappedBuffer.vcxproj @@ -19,13 +19,13 @@ Application true - v120 + v110 Unicode Application false - v120 + v110 true Unicode diff --git a/project/StandardMappedBuffer/StandardMappedBuffer.vcxproj b/project/StandardMappedBuffer/StandardMappedBuffer.vcxproj index bb43c2a..4b5202b 100644 --- a/project/StandardMappedBuffer/StandardMappedBuffer.vcxproj +++ b/project/StandardMappedBuffer/StandardMappedBuffer.vcxproj @@ -19,13 +19,13 @@ Application true - v120 + v110 Unicode Application false - v120 + v110 true Unicode diff --git a/src/PersistentMappedBuffer.cpp b/src/PersistentMappedBuffer.cpp index 5e915d3..987d49f 100644 --- a/src/PersistentMappedBuffer.cpp +++ b/src/PersistentMappedBuffer.cpp @@ -27,8 +27,11 @@ namespace struct Range { - size_t begin = 0; - GLsync sync = 0; + size_t begin; + GLsync sync; + Range() + : begin(0), sync(0) + { ; } }; const GLchar* gVertexShaderSource[] = { @@ -128,9 +131,16 @@ void PrepareReferenceTriangles(SVertex2D *trianglePos, size_t triangleCount) float py = ((float)rand() / (float)RAND_MAX)*1.9f - 0.95f; float pd = 0.02f;// ((float)rand() / (float)RAND_MAX)*0.02f + 0.01f; - trianglePos[i * 3 + 0] = { px, py + pd }; - trianglePos[i * 3 + 1] = { px - pd, py - pd }; - trianglePos[i * 3 + 2] = { px + pd, py - pd }; + trianglePos[i * 3 + 0].x = px; + trianglePos[i * 3 + 0].y = py + pd; + trianglePos[i * 3 + 1].x = px - pd; + trianglePos[i * 3 + 1].y = py - pd; + trianglePos[i * 3 + 2].x = px + pd; + trianglePos[i * 3 + 2].y = py - pd; + + //trianglePos[i * 3 + 0] = { px, py + pd }; + //trianglePos[i * 3 + 1] = { px - pd, py - pd }; + //trianglePos[i * 3 + 2] = { px + pd, py - pd }; } } @@ -221,7 +231,7 @@ void Init(void) PrepareReferenceTriangles(gReferenceTrianglePosition.get(), gParamTriangleCount); //Create an immutable data store for the buffer - size_t bufferSize{ gParamTriangleCount * 3 * sizeof(SVertex2D)}; + size_t bufferSize( gParamTriangleCount * 3 * sizeof(SVertex2D)); if (gParamBufferCount > 1) { bufferSize *= gParamBufferCount; diff --git a/src/StandardMappedBuffer.cpp b/src/StandardMappedBuffer.cpp index ac0b308..08e176b 100644 --- a/src/StandardMappedBuffer.cpp +++ b/src/StandardMappedBuffer.cpp @@ -118,9 +118,12 @@ void PrepareReferenceTriangles(SVertex2D *trianglePos, size_t triangleCount) float py = ((float)rand() / (float)RAND_MAX)*1.9f - 0.95f; float pd = 0.02f;// ((float)rand() / (float)RAND_MAX)*0.02f + 0.01f; - trianglePos[i * 3 + 0] = { px, py + pd }; - trianglePos[i * 3 + 1] = { px - pd, py - pd }; - trianglePos[i * 3 + 2] = { px + pd, py - pd }; + trianglePos[i * 3 + 0].x = px; + trianglePos[i * 3 + 0].y = py + pd; + trianglePos[i * 3 + 1].x = px - pd; + trianglePos[i * 3 + 1].y = py - pd; + trianglePos[i * 3 + 2].x = px + pd; + trianglePos[i * 3 + 2].y = py - pd; } } @@ -204,7 +207,7 @@ void Init(void) PrepareReferenceTriangles(gReferenceTrianglePosition.get(), gParamTriangleCount); //Create an immutable data store for the buffer - const size_t bufferSize{ gParamTriangleCount * 3 * sizeof(SVertex2D)}; + const size_t bufferSize( gParamTriangleCount * 3 * sizeof(SVertex2D)); glBufferData(GL_ARRAY_BUFFER, bufferSize, nullptr, GL_STREAM_DRAW); @@ -233,7 +236,7 @@ void Display() glClear(GL_COLOR_BUFFER_BIT); gAngle += 0.001f; - const size_t bufferSize{ gParamTriangleCount * 3 * sizeof(SVertex2D) }; + const size_t bufferSize( gParamTriangleCount * 3 * sizeof(SVertex2D) ); if (gParamUseMapBuffer) {