Apply changes from latest known public version of bounce dated 2019-11-13

This commit is contained in:
Luke Benstead
2020-01-25 12:31:05 +00:00
parent f87e2a6378
commit a61262407c
431 changed files with 108959 additions and 26372 deletions

View File

@@ -166,7 +166,7 @@ struct DrawPoints
glBufferData(GL_ARRAY_BUFFER, e_vertexCapacity * sizeof(b3Color), m_colors, GL_DYNAMIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER, m_vboIds[2]);
glBufferData(GL_ARRAY_BUFFER, e_vertexCapacity * sizeof(float32), m_sizes, GL_DYNAMIC_DRAW);
glBufferData(GL_ARRAY_BUFFER, e_vertexCapacity * sizeof(scalar), m_sizes, GL_DYNAMIC_DRAW);
AssertGL();
@@ -181,7 +181,7 @@ struct DrawPoints
glDeleteBuffers(3, m_vboIds);
}
void Vertex(const b3Vec3& v, float32 size, const b3Color& color)
void Vertex(const b3Vec3& v, scalar size, const b3Color& color)
{
if (m_count == e_vertexCapacity)
{
@@ -226,7 +226,7 @@ struct DrawPoints
glVertexAttribPointer(m_colorAttribute, 4, GL_FLOAT, GL_FALSE, 0, BUFFER_OFFSET(0));
glBindBuffer(GL_ARRAY_BUFFER, m_vboIds[2]);
glBufferSubData(GL_ARRAY_BUFFER, 0, m_count * sizeof(float32), m_sizes);
glBufferSubData(GL_ARRAY_BUFFER, 0, m_count * sizeof(scalar), m_sizes);
glEnableVertexAttribArray(m_sizeAttribute);
glVertexAttribPointer(m_sizeAttribute, 1, GL_FLOAT, GL_FALSE, 0, BUFFER_OFFSET(0));
@@ -255,7 +255,7 @@ struct DrawPoints
b3Vec3 m_vertices[e_vertexCapacity];
b3Color m_colors[e_vertexCapacity];
float32 m_sizes[e_vertexCapacity];
scalar m_sizes[e_vertexCapacity];
u32 m_count;
GLuint m_programId;
@@ -365,7 +365,7 @@ struct DrawLines
glDisableVertexAttribArray(m_colorAttribute);
glEnableVertexAttribArray(m_vertexAttribute);
glDisableVertexAttribArray(m_vertexAttribute);
glBindBuffer(GL_ARRAY_BUFFER, 0);
glUseProgram(0);
@@ -608,7 +608,7 @@ struct DrawWire
glDeleteProgram(m_programId);
}
void DrawSphere(float32 radius, const b3Color& c, const b3Transform& xf)
void DrawSphere(scalar radius, const b3Color& c, const b3Transform& xf)
{
if (!g_glDrawLines)
{
@@ -777,7 +777,7 @@ struct DrawSolid
{
}
void DrawCylinder(float32 radius, float32 height, const b3Color& c, const b3Transform& xf)
void DrawCylinder(scalar radius, scalar height, const b3Color& c, const b3Transform& xf)
{
if (!g_glDrawTriangles)
{
@@ -820,7 +820,7 @@ struct DrawSolid
glUseProgram(0);
}
void DrawSphere(float32 radius, const b3Color& c, const b3Transform& xf)
void DrawSphere(scalar radius, const b3Color& c, const b3Transform& xf)
{
if (!g_glDrawTriangles)
{
@@ -874,4 +874,4 @@ struct DrawSolid
DrawSolidCylinder m_cylinder;
};
#endif
#endif