Fix specialized shaders on Android

This commit is contained in:
wheremyfoodat 2024-03-02 23:29:22 +02:00
parent fc83d518e2
commit e5c09a092d
2 changed files with 9 additions and 0 deletions

View file

@ -30,5 +30,10 @@ namespace PICA::ShaderGen {
FragmentGenerator(API api, Language language) : api(api), language(language) {}
std::string generate(const PICARegs& regs);
std::string getVertexShader(const PICARegs& regs);
void setTarget(API api, Language language) {
this->api = api;
this->language = language;
}
};
}; // namespace PICA::ShaderGen

View file

@ -44,6 +44,10 @@ void RendererGL::reset() {
gl.useProgram(oldProgram); // Switch to old GL program
}
#ifdef __ANDROID__
fragShaderGen.setTarget(PICA::ShaderGen::API::GLES, PICA::ShaderGen::Language::GLSL);
#endif
}
void RendererGL::initGraphicsContextInternal() {