Hi,
I need to set background image for my app window. I have there 6 viewports but I have one image. I found way to do it like this, but it is wierd to do it 6 times for one image. Is there possibility to simply set background to whole window?
[java]AWTLoader loader = new AWTLoader();
Image image = loader.load(bImg, true);
Texture2D texture = new Texture2D();
texture.setImage(image);
Picture[] p = new Picture[viewCount];
int[] posX = {0, -viewWidth, -2 * viewWidth, 0, -viewWidth, -2 * viewWidth};
int[] posY = {-viewHeight, -viewHeight, -viewHeight, 0, 0, 0};
for (int i = 0; i < viewCount; i++) {
p[i] = new Picture("background");
p[i].setTexture(am, texture, true);
p[i].setWidth(viewWidth * 3);
p[i].setHeight(viewHeight * 2);
p[i].setPosition(posX[i], posY[i]);
ViewPort pv = renderManager.createPreView("background", cameras[i]);
pv.setClearFlags(true, true, true);
pv.attachScene(p[i]);
viewPorts[i].setClearFlags(false, true, true);
p[i].updateGeometricState();
} [/java]