Hello everyone,
I wanna make a threaded loading of textures in my engine, but the transfer of textures from main memory to the memory on graphics card is slower than reading from my harddrive… This sounds weird…
Look at my example:
double time = System.currentTimeMillis();
BufferedImage bi = ImageIO.read(getClass().getResource(fileName));
TextureData texData = new TextureData(bi.getType(), bi.TYPE_INT_ARGB, false, bi);
System.out.println("time to load tex from hdd:" + (System.currentTimeMillis() - time));
time = System.currentTimeMillis();
// text = TextureIO.newTexture(bi, false);
text = TextureIO.newTexture(texData);
System.out.println("time to load tex into graphics card:" + (System.currentTimeMillis() - time));
This results in the following test output:
time to load tex from hdd:116.0
time to load tex into graphics card:382.0
time to load tex from hdd:49.0
time to load tex into graphics card:280.0
time to load tex from hdd:38.0
time to load tex into graphics card:67.0
time to load tex from hdd:92.0
time to load tex into graphics card:71.0
time to load tex from hdd:40.0
time to load tex into graphics card:52.0
time to load tex from hdd:32.0
time to load tex into graphics card:51.0
time to load tex from hdd:32.0
time to load tex into graphics card:53.0
time to load tex from hdd:33.0
time to load tex into graphics card:52.0
time to load tex from hdd:33.0
time to load tex into graphics card:54.0
Please help me, im stuck with this. I am certain that the transfer from main memory to graphics-memory should be way faster than Harddisk Access…