New answers tagged

0

The issue is due to memory usage, wasted memory bandwidth and/or the time it takes to rescale it to the proper size at load time. In the case of Android using the 2D UI the image will be scaled once to the proper size at load time but this takes a bit of time and the larger original will be kept in memory if a reference to it is kept. In the case of direct ...


1

Don't get caught up in the exact numbers used in the example. Those are not the main point. It's how they are relative to each other. You see that xhdpi 200x200 is twice as big as mdpi 100x100. Notice the if in the example. List of densities: xxhdpi: 3.0 xhdpi: 2.0 hdpi: 1.5 mdpi: 1.0 (baseline) ldpi: 0.75 Sample example but with different numbers: ...


3

You load your images like this: texture = TextureLoader.getTexture("PNG", new FileInputStream("res/" + fileName + ".png")); However if you read through the source code of slick you'll see that internally it is represented as TextureImpl which was the following documentation. A texture to be bound within JOGL. This object is responsible for keeping ...



Top 50 recent answers are included