figofuture / angle

Automatically exported from code.google.com/p/angle
0 stars 0 forks source link

AngleSurfaceView setBackgroundResource background appears on top of other objects #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using AngleSurfaceView setBackgroundResource to draw a background to the 
SurfaceView causes the resource to be rendered on top of any other objects 
(such as AngleSprite).

I'd imagine that this method should 'just work', but if not, do I need to use 
AngleTexture instead to display a background, or some other method?

Original issue reported on code.google.com by gpear...@gmail.com on 7 Sep 2010 at 7:27

GoogleCodeExporter commented 9 years ago
It appears this is the same for any SurfaceView, not just AngleSurfaceView so 
although not really Angle specific, and advice would be appreciated.

Original comment by gpear...@gmail.com on 7 Sep 2010 at 8:05

GoogleCodeExporter commented 9 years ago
You're right gpearman.

You can use an AngleSprite for the background.
AngleSprites are incredibly fast. You can see even if you add 100 AngleStrites 
to the render tree you don't notice any performance loss.

If you don't know. glDrawTexOES(the method used for AngleSprite rendering) 
can't use ZOrder so the sprites are drawn form back to from as you have them on 
your tree.
Cause this issue I use the same rendering method even for AngleRotatingSprites 
that use VBOs. So you can mix freely AngleSprites and AngleRotatingSprites in 
the same scene.

Original comment by ipaju...@gmail.com on 16 Sep 2010 at 8:15