If you’re lazy and you want a simple background image for your 3D, here’s a neat trick:
- Add a UIImageView to your .nib file (this will be your background image)
- Add your EAGLView as a child to the same parent as the background image
- Clear the background before rendering:
glClearColor(0.0f,0.0f,0.0f,0.0f); - Run your app.
- Sit back and enjoy.
You can color the background by passing other values.
You can still enable fog. Fog colors polygons, not the background. The only problem is, far objects won’t blend in the background. They’ll stand out fogged like hair in the distant soup. Works well for starry skies, or just if the lower part of your sky is the same color as the fog.


Comments