Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mumu-sild opened this issue Sep 7, 2023 · 0 comments

Comments

@mumu-sild
Copy link

问题:
在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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant