1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

More zero -> nullptr fixes

This commit is contained in:
jules 2018-10-09 11:42:55 +01:00
parent 132017558f
commit 359132ed55
15 changed files with 28 additions and 21 deletions

View file

@ -422,7 +422,7 @@ struct ShaderPrograms : public ReferenceCountedObject
void bindAttributes (OpenGLContext& context)
{
context.extensions.glVertexAttribPointer ((GLuint) positionAttribute.attributeID, 2, GL_SHORT, GL_FALSE, 8, (void*) 0);
context.extensions.glVertexAttribPointer ((GLuint) positionAttribute.attributeID, 2, GL_SHORT, GL_FALSE, 8, nullptr);
context.extensions.glVertexAttribPointer ((GLuint) colourAttribute.attributeID, 4, GL_UNSIGNED_BYTE, GL_TRUE, 8, (void*) 4);
context.extensions.glEnableVertexAttribArray ((GLuint) positionAttribute.attributeID);
context.extensions.glEnableVertexAttribArray ((GLuint) colourAttribute.attributeID);
@ -1279,7 +1279,7 @@ struct StateHelpers
context.extensions.glBufferSubData (GL_ARRAY_BUFFER, 0, (GLsizeiptr) ((size_t) numVertices * sizeof (VertexInfo)), vertexData);
// NB: If you get a random crash in here and are running in a Parallels VM, it seems to be a bug in
// their driver.. Can't find a workaround unfortunately.
glDrawElements (GL_TRIANGLES, (numVertices * 3) / 2, GL_UNSIGNED_SHORT, 0);
glDrawElements (GL_TRIANGLES, (numVertices * 3) / 2, GL_UNSIGNED_SHORT, nullptr);
JUCE_CHECK_OPENGL_ERROR
numVertices = 0;
}