]> git.tdb.fi Git - libs/gl.git/blobdiff - source/programbuilder.cpp
Pass the resource collection to async loaders
[libs/gl.git] / source / programbuilder.cpp
index dc4bd19cacce0f146436bee57420946f6200321b..de1fb1604db2ea5dcd77c20a2fbf036f18fe3894 100644 (file)
@@ -238,7 +238,10 @@ ProgramBuilder::ProgramBuilder(const StandardFeatures &f):
 
        if(!features.legacy)
        {
+               aliases["texture1D"] = "texture";
                aliases["texture2D"] = "texture";
+               aliases["texture3D"] = "texture";
+               aliases["textureCube"] = "texture";
                aliases["shadow2D"] = "texture";
        }
        else
@@ -385,7 +388,6 @@ string ProgramBuilder::create_source(const list<ShaderVariable *> &variables, Va
                {
                        if(use_blocks)
                                source += "#version 300 es\n";
-                       source += "precision mediump float;\n";
                }
                else
                {
@@ -395,6 +397,9 @@ string ProgramBuilder::create_source(const list<ShaderVariable *> &variables, Va
                }
        }
 
+       if(get_gl_api()==OPENGL_ES2)
+               source += "precision mediump float;\n";
+
        set<const VariableDefinition *> declared_types;
        set<string> uniform_blocks;
        for(list<ShaderVariable *>::const_iterator i=variables.begin(); i!=variables.end(); ++i)