Fix shader compilation errors

This commit is contained in:
wheremyfoodat 2024-02-29 00:56:24 +02:00
parent 58da6ea8a4
commit ddc14cea09
3 changed files with 80 additions and 8 deletions

View file

@ -388,7 +388,15 @@ void RendererGL::drawVertices(PICA::PrimType primType, std::span<const Vertex> v
OpenGL::TriangleFan,
OpenGL::Triangle,
};
std::cout << fragShaderGen.generate(regs);
std::string vs = fragShaderGen.getVertexShader(regs);
std::string fs = fragShaderGen.generate(regs);
std::cout << fs << "\n\n\n";
OpenGL::Program program;
OpenGL::Shader vertShader({vs.c_str(), vs.size()}, OpenGL::Vertex);
OpenGL::Shader fragShader({fs.c_str(), fs.size()}, OpenGL::Fragment);
program.create({vertShader, fragShader});
const auto primitiveTopology = primTypes[static_cast<usize>(primType)];
gl.disableScissor();