OpenGL Shader Compilation Errors: unexpected $undefined at token “

前端 未结 4 1062
萌比男神i
萌比男神i 2020-12-30 07:03

I saw this question and it really shedded some light. Despite this, I can\'t seem to figure out how I\'m \"improperly\" loading my shader, because this has executed

4条回答
  •  滥情空心
    2020-12-30 07:40

    This is probably not related to your current problem, but will be one soon enough :

    verts[ i ] = new float[ size ];
    verts[ i ] = const_cast< float* >( glm::value_ptr( iVertices.next() ) );
    

    The memory allocated in the first line is leaked, moreover, when you call delete a few lines after, you're deleting the value given by new but the casted one. Is that what you mean ?

提交回复
热议问题