Loading SPIRV binary shader fails
问题 In my program I tried to load precompiled binary shaders with the example code from Sasha Willems (https://github.com/SaschaWillems/openglcpp/blob/master/SPIRVShader/main.cpp): bool loadBinaryShader(const char *fileName, GLuint stage, GLuint binaryFormat, GLuint &shader) { std::ifstream shaderFile; shaderFile.open(fileName, std::ios::binary | std::ios::ate); if (shaderFile.is_open()) { size_t size = shaderFile.tellg(); shaderFile.seekg(0, std::ios::beg); char* bin = new char[size]; shaderFile