@@ -194,7 +194,7 @@ namespace matplot::backend {
194
194
// Set the vertex attributes pointers
195
195
int vertex_attribute_location = 0 ;
196
196
size_t stride = 2 * sizeof (float );
197
- glVertexAttribPointer (vertex_attribute_location, 2 , GL_FLOAT, GL_FALSE, stride, (void *)0 );
197
+ glVertexAttribPointer (vertex_attribute_location, 2 , GL_FLOAT, GL_FALSE, static_cast <GLsizei>( stride) , (void *)0 );
198
198
glEnableVertexAttribArray (0 );
199
199
200
200
// Set the color attribute pointers
@@ -223,12 +223,12 @@ namespace matplot::backend {
223
223
if (vertexColorLocation == -1 ) {
224
224
throw std::runtime_error (" can't find uniform location" );
225
225
}
226
- glUniform4f (vertexColorLocation, color[1 ], color[2 ], color[3 ], 1 .-color[0 ]);
226
+ glUniform4f (vertexColorLocation, color[1 ], color[2 ], color[3 ], 1 .f -color[0 ]);
227
227
228
228
// Bind element buffer
229
229
glBindBuffer (GL_ELEMENT_ARRAY_BUFFER, EBO);
230
230
glBindVertexArray (VAO);
231
- glDrawElements (GL_TRIANGLES, indices.size (), GL_UNSIGNED_INT, 0 );
231
+ glDrawElements (GL_TRIANGLES, static_cast <GLsizei>( indices.size ()) , GL_UNSIGNED_INT, nullptr );
232
232
233
233
// Unbind our vertex array
234
234
glBindVertexArray (0 );
@@ -239,7 +239,7 @@ namespace matplot::backend {
239
239
}
240
240
241
241
void opengl_embed::draw_background (const std::array<float , 4 > &color) {
242
- glClearColor (color[1 ], color[2 ], color[3 ], 1 . - color[0 ]);
242
+ glClearColor (color[1 ], color[2 ], color[3 ], 1 .f - color[0 ]);
243
243
glClear (GL_COLOR_BUFFER_BIT);
244
244
}
245
245
@@ -273,7 +273,7 @@ namespace matplot::backend {
273
273
// Set the vertex attributes pointers
274
274
int vertex_attribute_location = 0 ;
275
275
size_t stride = 2 * sizeof (float );
276
- glVertexAttribPointer (vertex_attribute_location, 2 , GL_FLOAT, GL_FALSE, stride, (void *)0 );
276
+ glVertexAttribPointer (vertex_attribute_location, 2 , GL_FLOAT, GL_FALSE, static_cast <GLsizei>( stride) , (void *)0 );
277
277
glEnableVertexAttribArray (0 );
278
278
279
279
// Activate our shader program
@@ -297,11 +297,11 @@ namespace matplot::backend {
297
297
if (vertexColorLocation == -1 ) {
298
298
throw std::runtime_error (" can't find uniform location" );
299
299
}
300
- glUniform4f (vertexColorLocation, color[1 ], color[2 ], color[3 ], 1 .-color[0 ]);
300
+ glUniform4f (vertexColorLocation, color[1 ], color[2 ], color[3 ], 1 .f -color[0 ]);
301
301
302
302
// Bind element buffer
303
303
glBindVertexArray (VAO);
304
- glDrawArrays (GL_LINE_STRIP, 0 , x.size ());
304
+ glDrawArrays (GL_LINE_STRIP, 0 , static_cast <GLsizei>( x.size () ));
305
305
306
306
// Unbind our vertex array
307
307
glBindVertexArray (0 );
0 commit comments