Rev 194 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 185 | chris | 1 | package com.gebauz.Bauzoid.graphics; |
| 2 | |||
| 3 | import com.gebauz.Bauzoid.app.GameObject; |
||
| 4 | import com.gebauz.Bauzoid.graphics.renderstate.RenderStates; |
||
| 5 | |||
| 6 | /** Children of the Graphics subsystem. |
||
| 7 | * Strictly speaking this is an extension of the GameObject in that it is part of the |
||
| 8 | * Game Graph. However, it provides direct access to the Graphics object without having |
||
| 9 | * to resort to the Game object |
||
| 10 | */ |
||
| 11 | public class GraphicsObject extends GameObject |
||
| 12 | { |
||
| 13 | protected Graphics mGraphics = null; |
||
| 14 | |||
| 15 | /** Constructor. */ |
||
| 16 | public GraphicsObject(Graphics graphics) |
||
| 17 | { |
||
| 18 | super(graphics.getGame()); |
||
| 19 | mGraphics = graphics; |
||
| 20 | } |
||
| 21 | |||
| 22 | /** Get the Graphics object. */ |
||
| 23 | public final Graphics getGraphics() |
||
| 24 | { |
||
| 25 | return mGraphics; |
||
| 26 | } |
||
| 27 | |||
| 28 | /** Convenience method to get the RenderStates object. */ |
||
| 29 | public final RenderStates getRenderStates() |
||
| 30 | { |
||
| 31 | return mGraphics.renderStates; |
||
| 32 | } |
||
| 193 | chris | 33 | |
| 34 | /** Called to destroy internal GL resources and the like when the surface is lost. */ |
||
| 35 | public void onSurfaceLost() |
||
| 36 | { |
||
| 37 | |||
| 38 | } |
||
| 39 | |||
| 40 | /** Called when internal GL resources need to be recreated. */ |
||
| 41 | public void onSurfaceRecreated() |
||
| 42 | { |
||
| 43 | |||
| 44 | } |
||
| 194 | chris | 45 | |
| 185 | chris | 46 | } |