Skip to content

Release下运行,Shader报错:Attached vertex shader is not compiled. #13

@mumu-sild

Description

@mumu-sild

问题:
在Frame->Shader.cpp文件中

···cpp
GLint CShader::__loadShader(const std::string& vShaderFileName, GLint vShaderType) const
···

出了问题,没有编译Shader文件

原因是在Release模式下,不会运行_ASSERT函数,因此忽略了_ASSERT(__compileShader(Shader));
所以在Debug下可以正常运行,但是在Release下运行报错。

建议修改为
GLboolean isCompileShader = __compileShader(Shader);
_ASSERT(isCompileShader);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions