Showing the changes to libraries/render-utils/src/Model.cpp (1 of 7 files). Show all
Unified · Split
| @@ -299,6 +299,15 @@ void Model::init() { · 298 unmodified lines | ||
| 299 | 299 | _program.addShaderFromSourceCode(QGLShader::Fragment, model_frag); |
| 300 | 300 | initProgram(_program, _locations); |
| 301 | 301 | |
| 302 | + | |
| 303 | + auto defaultShader = gpu::ShaderPointer( | |
| 304 | + gpu::Shader::createProgram( | |
| 305 | + gpu::ShaderPointer(gpu::Shader::createVertex(std::string(model_vert))), | |
| 306 | + gpu::ShaderPointer(gpu::Shader::createPixel(std::string(model_frag))) | |
| 307 | + ) | |
| 308 | + ); | |
| 309 | + gpu::GLBackend::makeShader(*defaultShader); | |
| 310 | + | |
| 302 | 311 | _normalMapProgram.addShaderFromSourceCode(QGLShader::Vertex, model_normal_map_vert); |
| 303 | 312 | _normalMapProgram.addShaderFromSourceCode(QGLShader::Fragment, model_normal_map_frag); |
| 304 | 313 | initProgram(_normalMapProgram, _normalMapLocations); |