Mentions légales du service

Skip to content
Snippets Groups Projects
Commit ad10e0ad authored by Tackwin's avatar Tackwin Committed by Mathieu Faverge
Browse files

Fix window startup crash

parent c86405e2
Branches
Tags
No related merge requests found
Pipeline #116827 passed
......@@ -163,18 +163,19 @@ void Vbo::config(int glsl){
int colors_size = _colors.size() * sizeof(Element_col);
int texture_size = _texture_coord.size() * sizeof(Element_pos);
int shaded_size;
Element_pos * vertex = &_vertex[0];
Element_col * colors = &_colors[0];
Element_pos * texture = &_texture_coord[0];
Element_pos* vertex = _vertex.data();
Element_col* colors = _colors.data();
Element_pos* texture = _texture_coord.data();
char * shaded;
float* shaded2;
if(glsl<330){ //use float for color gradient
shaded_size = _shaded2.size() * sizeof(float);
shaded2 = &_shaded2[0];
shaded2 = _shaded2.data();
}
else{ //use char for color gradient
shaded_size = _shaded.size() * sizeof(char);
shaded = &_shaded[0];
shaded = _shaded.data();
}
//Delete old vbo if necessary
if(glIsBuffer(_vboID) == GL_TRUE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment