package com.clashsoft.hypercube.util;

import javafx.scene.image.Image;
import javafx.scene.paint.Color;
import javafx.scene.paint.Material;
import javafx.scene.paint.PhongMaterial;

public final class TextureLoader
{
	public static Material material(String domain, String imageSource)
	{
		final PhongMaterial material = new PhongMaterial(Color.WHITE);
		material.setDiffuseMap(load(domain, imageSource));
		return material;
	}

	public static Image load(String domain, String imageSource)
	{
		try
		{
			return new Image(domain + '/' + imageSource + ".png");
		}
		catch (Exception ex)
		{
			throw new RuntimeException("Cannot load image: " + domain + "/" + imageSource, ex);
		}
	}
}

package com.clashsoft.hypercube.util;

import javafx.scene.image.Image;
import javafx.scene.paint.Color;
import javafx.scene.paint.Material;
import javafx.scene.paint.PhongMaterial;

import java.io.File;

public final class TextureLoader
{
	public static Material material(String domain, String imageSource)
	{
		final PhongMaterial material = new PhongMaterial(Color.WHITE);
		material.setDiffuseMap(load(domain, imageSource));
		return material;
	}

	public static Image load(String domain, String imageSource)
	{
		try
		{
			return new Image(domain + File.separator + imageSource + ".png");
		}
		catch (Exception ex)
		{
			throw new RuntimeException("Cannot load image: " + domain + "/" + imageSource, ex);
		}
	}
}

--- 
+++ 
@@ -4,8 +4,6 @@
 import javafx.scene.paint.Color;
 import javafx.scene.paint.Material;
 import javafx.scene.paint.PhongMaterial;
-
-import java.io.File;
 
 public final class TextureLoader
 {
@@ -20,7 +18,7 @@
 	{
 		try
 		{
-			return new Image(domain + File.separator + imageSource + ".png");
+			return new Image(domain + '/' + imageSource + ".png");
 		}
 		catch (Exception ex)
 		{
Fix Texture Loading on Windows

- Fixed Textures not being loaded correctly on Windows.
