=== modified file 'src/scene-build.cpp'
--- src/scene-build.cpp	2011-07-01 16:56:27 +0000
+++ src/scene-build.cpp	2011-07-04 10:46:22 +0000
@@ -58,8 +58,11 @@
 
     model.convert_to_mesh(mMesh, attribs);
 
-    if (!Scene::load_shaders(mProgram, vtx_shader_filename, frg_shader_filename))
+    if (!Scene::load_shaders_from_files(mProgram, vtx_shader_filename,
+                                        frg_shader_filename))
+    {
         return 0;
+    }
 
     std::vector<GLint> attrib_locations;
     attrib_locations.push_back(mProgram.getAttribIndex("position"));

=== modified file 'src/scene-shading.cpp'
--- src/scene-shading.cpp	2011-07-01 15:31:27 +0000
+++ src/scene-shading.cpp	2011-07-04 10:46:22 +0000
@@ -97,8 +97,11 @@
         frg_shader_filename = GLMARK_DATA_PATH"/shaders/light-advanced.frag";
     }
 
-    if (!Scene::load_shaders(mProgram, vtx_shader_filename, frg_shader_filename))
+    if (!Scene::load_shaders_from_files(mProgram, vtx_shader_filename,
+                                        frg_shader_filename))
+    {
         return;
+    }
 
     mProgram.start();
 

=== modified file 'src/scene-texture.cpp'
--- src/scene-texture.cpp	2011-07-01 14:25:12 +0000
+++ src/scene-texture.cpp	2011-07-04 10:46:22 +0000
@@ -54,8 +54,11 @@
     model.convert_to_mesh(mCubeMesh);
     mCubeMesh.build_vbo();
 
-    if (!Scene::load_shaders(mProgram, vtx_shader_filename, frg_shader_filename))
+    if (!Scene::load_shaders_from_files(mProgram, vtx_shader_filename,
+                                        frg_shader_filename))
+    {
         return 0;
+    }
 
     std::vector<GLint> attrib_locations;
     attrib_locations.push_back(mProgram.getAttribIndex("position"));

=== modified file 'src/scene.cpp'
--- src/scene.cpp	2011-06-30 12:39:37 +0000
+++ src/scene.cpp	2011-07-04 10:46:22 +0000
@@ -171,19 +171,12 @@
 }
 
 bool
-Scene::load_shaders(Program &program,
-                    const std::string &vtx_shader_filename,
-                    const std::string &frg_shader_filename)
+Scene::load_shaders_from_strings(Program &program,
+                                 const std::string &vtx_shader,
+                                 const std::string &frg_shader,
+                                 const std::string &vtx_shader_filename,
+                                 const std::string &frg_shader_filename)
 {
-    std::string vtx_shader;
-    std::string frg_shader;
-
-    if (!gotSource(vtx_shader_filename, vtx_shader))
-        return false;
-
-    if (!gotSource(frg_shader_filename, frg_shader))
-        return false;
-
     program.init();
 
     program.addShader(GL_VERTEX_SHADER, vtx_shader);
@@ -217,6 +210,26 @@
     return true;
 }
 
+bool
+Scene::load_shaders_from_files(Program &program,
+                               const std::string &vtx_shader_filename,
+                               const std::string &frg_shader_filename)
+{
+    std::string vtx_shader;
+    std::string frg_shader;
+
+    if (!gotSource(vtx_shader_filename, vtx_shader))
+        return false;
+
+    if (!gotSource(frg_shader_filename, frg_shader))
+        return false;
+
+    return Scene::load_shaders_from_strings(program, vtx_shader, frg_shader,
+                                            vtx_shader_filename,
+                                            frg_shader_filename);
+
+}
+
 uint64_t
 Scene::get_timestamp_us()
 {

=== modified file 'src/scene.h'
--- src/scene.h	2011-07-01 14:23:43 +0000
+++ src/scene.h	2011-07-04 10:46:22 +0000
@@ -93,9 +93,14 @@
 
     virtual ValidationResult validate() { return ValidationUnknown; }
 
-    static bool load_shaders(Program &program,
-                             const std::string &vtx_shader_filename,
-                             const std::string &frg_shader_filename);
+    static bool load_shaders_from_strings(Program &program,
+                                          const std::string &vtx_shader,
+                                          const std::string &frg_shader,
+                                          const std::string &vtx_shader_filename = "None",
+                                          const std::string &frg_shader_filename = "None");
+    static bool load_shaders_from_files(Program &program,
+                                        const std::string &vtx_shader_filename,
+                                        const std::string &frg_shader_filename);
 
     static uint64_t get_timestamp_us();
 

