X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmaterials%2Funlitmaterial.cpp;h=9aded2522972250cc76b1efcc3b0a745916b4461;hb=842c817bb679a5a0abc05e8149e2e6e0ae1a0412;hp=5eddd66997416438643003dd5efdc872a25ebbec;hpb=0912a8d73043961ab7a4d66cd2fbb13187483ffd;p=libs%2Fgl.git diff --git a/source/materials/unlitmaterial.cpp b/source/materials/unlitmaterial.cpp index 5eddd669..9aded252 100644 --- a/source/materials/unlitmaterial.cpp +++ b/source/materials/unlitmaterial.cpp @@ -12,14 +12,11 @@ UnlitMaterial::UnlitMaterial(): set_tint(Color(1.0f)); } -string UnlitMaterial::create_program_source() const +void UnlitMaterial::fill_program_info(string &module_name, map &spec_values) const { - string source = "import unlit;\n"; - if(texture) - source += "const bool use_texture = true;\n"; - if(vertex_color) - source += "const bool use_vertex_color = true;\n"; - return source; + module_name = "unlit.glsl"; + spec_values["use_texture"] = (texture!=0); + spec_values["use_vertex_color"] = vertex_color; } void UnlitMaterial::attach_textures_to(Texturing &texturing, ProgramData &tex_shdata) const