Unfortunately no. You have to draw the background yourself onto the surface.

On Fri, Mar 27, 2009 at 12:13 AM, Dan Raaka <[email protected]> wrote:
>
> In the APIDemos
>
>    protected void onCreate(Bundle savedInstanceState) {
>        super.onCreate(savedInstanceState);
>
>        // Create our Preview view and set it as the content of our
>        // Activity
>        mGLSurfaceView = new GLSurfaceView(this);
>        mGLSurfaceView.setRenderer(new CubeRenderer(false));
>        setContentView(mGLSurfaceView);
>    }
>
> works fine as expected .. however .. adding a line like
>    protected void onCreate(Bundle savedInstanceState) {
>        super.onCreate(savedInstanceState);
>
>        // Create our Preview view and set it as the content of our
>        // Activity
>        mGLSurfaceView = new GLSurfaceView(this);
>        mGLSurfaceView.setBackgroundColor(Color.RED);
>        //mGLSurfaceView.setBackgroundResource(R.drawable.sample01);
>        mGLSurfaceView.setRenderer(new CubeRenderer(false));
>        setContentView(mGLSurfaceView);
>    }
> Does render on the screen as if the background was over-layed on top
> of the cube !! I suspect the cube is still being rendered but behind
> the RED background.
>
> Is there a way to set the background of the SurfaceView just like a 2D
> view ?
>
> -Dan
> >
>



-- 
Romain Guy
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to