[android-developers] Re: Adding static background to kube

2010-04-28 Thread CMF
is there anyone know? On Apr 26, 2:24 pm, CMF manf...@gmail.com wrote: Hi all, I would like to ask how to add a static background to the kube from the ApiDemo I have created a sqaure behind the Kube, but it will rotate as the kube does How to make the background static? -- You received

[android-developers] Re: Adding static background to kube

2010-04-28 Thread String
On Apr 26, 7:24 am, CMF manf...@gmail.com wrote: Hi all, I would like to ask how to add a static background to the kube from the ApiDemo There are two ways that immediately occur to me. First, make it translucent and put it on top of a view containing your background image. See

[android-developers] Re: Adding static background to kube

2010-04-28 Thread Robert Green
String is correct on using the matrix stack. Follow those instructions and also consider just creating a textured quad and rendering it in an orthographic projection. That's a common practice for a nice, fast, easy background on a 3D scene. If you want it to look far away just blur and darken

[android-developers] Re: Adding static background to kube

2010-04-28 Thread CMF
Thank String and Robert,I can create the quad but I would like to know how to make the quad with texture(a 320x480 bitmap) best fits with the screen? On Apr 28, 5:17 pm, Robert Green rbgrn@gmail.com wrote: String is correct on using the matrix stack.  Follow those instructions and also

[android-developers] Re: Adding static background to kube

2010-04-28 Thread Robert Green
1) Load your bitmap into a power-of-two texture larger or roughly the same size as it. 512x512 works or 256x512 if you don't mind losing a bit of resolution. I won't post the code for that here. It's ugly and there's plenty of examples. 2) Generate a quad's worth of geometry (it's simple,