shader: Don't prepend GLSL #version directive on PS Vita

Vita uses Cg shaders.
This commit is contained in:
Sebastian Krzyszkowiak 2021-07-24 00:56:46 +02:00
parent 49795745cf
commit 18885f62e5
No known key found for this signature in database
GPG key ID: E8F235CF3BDBC3FF

View file

@ -29,7 +29,11 @@ static ALLEGRO_USTR* GetShaderSource(struct Game* game, const char* filename) {
// Even when ignoring macOS, the highest possible option right now is GLSL 1.30, because
// most Mesa drivers implement only OpenGL 3.0 on compatibility profile.
// TODO: upgrade to GLSL 1.50 (GL 3.2, highest possible on macOS) once Allegro works on core profiles
#ifndef __vita__
ALLEGRO_USTR* str = al_ustr_new(al_get_opengl_variant() == ALLEGRO_OPENGL_ES ? "#version 100\n" : "#version 120\n");
#else
ALLEGRO_USTR* str = al_ustr_new("");
#endif
while (true) {
char buf[512];