views:

72

answers:

1

I am currently playing about with lesson 08 here

http://insanitydesign.com/wp/projects/nehe-android-ports/

I would like to change the background colour from black to white. In order to do this at the start of onDrawFrame() I have called

gl.glClearColor(1.0f, 0.0f, 0.0f, 0.0f);

This does indeed set a white background screen, but also results in nothing else showing up on the screen! Clearly this is therefore an incorrect method, but why, and how do I fix it?!

Many thanks in advance.

Edit (5 days later): Does nobody know at all?!!

A: 

After you call gl.glClearColor(), redraw everything else. gl.glClearColor() does not change background color, it simply fills the screen with white color (which in effect erases everything you've previously drawn).

Lie Ryan
I am redrawing everything, but I still see just white. If I disable blending and enable depth testing instead then it works perfectly. So clearly it is some problem related to blending...