ecere/gfx: Moved CubeMap to Bitmap.ec
authorJerome St-Louis <jerome@ecere.com>
Wed, 3 Aug 2016 07:34:41 +0000 (03:34 -0400)
committerJerome St-Louis <jerome@ecere.com>
Wed, 3 Aug 2016 07:34:41 +0000 (03:34 -0400)
ecere/src/gfx/Bitmap.ec
ecere/src/gfx/drivers/gl3/defaultShader.ec

index cd01e7b..c1d3725 100644 (file)
@@ -945,3 +945,30 @@ public:
       return palette;
    }
 };
+
+public class CubeMap : Bitmap
+{
+public:
+   void Load(DisplaySystem displaySystem, const String * names, const String extension, bool oldStyle)
+   {
+      int i;
+      for(i = 0; i < 6; i++)
+      {
+         char location[MAX_LOCATION];
+         Bitmap face = i > 0 ? { } : this;
+         strcpy(location, names[i]);
+         if(extension)
+            ChangeExtension(location, extension, location);
+         if(face.Load(location, null, null))
+         {
+            face.driverData = driverData;
+            displaySystem.driver.MakeDDBitmap(displaySystem, face, true, (i + 1) | (oldStyle << 3));
+         }
+         if(i > 0)
+         {
+            face.driverData = 0;
+            delete face;
+         }
+      }
+   }
+};
index edb74cd..1f52d97 100644 (file)
@@ -4,34 +4,6 @@ import "shaders"
 
 namespace gfx::drivers;
 
-public class CubeMap : Bitmap
-{
-public:
-   void Load(DisplaySystem displaySystem, const String * names, const String extension, bool oldStyle)
-   {
-      int i;
-      for(i = 0; i < 6; i++)
-      {
-         char location[MAX_LOCATION];
-         Bitmap face = i > 0 ? { } : this;
-         strcpy(location, names[i]);
-         if(extension)
-            ChangeExtension(location, extension, location);
-         if(face.Load(location, null, null))
-         {
-            face.driverData = driverData;
-            displaySystem.driver.MakeDDBitmap(displaySystem, face, true, (i + 1) | (oldStyle << 3));
-         }
-         if(i > 0)
-         {
-            face.driverData = 0;
-            delete face;
-         }
-      }
-   }
-};
-
-
 // **********   Default Shader   **********
 public enum LightMode { off, dir, pos, posAtt, posSpot, posSpotAtt };
 public enum SwizzleMode { off, alpha, red };